From a77adf33c78b888f3d7ea9ac476f79c8717c7281 Mon Sep 17 00:00:00 2001 From: AJR Date: Mon, 16 Aug 2021 14:04:29 -0400 Subject: dvmemory: Substitute strongly typed enum for magic numbers specifying data format --- src/osd/modules/debugger/debugimgui.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/osd/modules/debugger/debugimgui.cpp') diff --git a/src/osd/modules/debugger/debugimgui.cpp b/src/osd/modules/debugger/debugimgui.cpp index 23cc8ef66ba..8fe382a8d72 100644 --- a/src/osd/modules/debugger/debugimgui.cpp +++ b/src/osd/modules/debugger/debugimgui.cpp @@ -844,23 +844,23 @@ void debug_imgui::draw_memory(debug_area* view_ptr, bool* opened) auto* mem = downcast(view_ptr->view); bool physical = mem->physical(); bool rev = mem->reverse(); - int format = mem->get_data_format(); + debug_view_memory::data_format format = mem->get_data_format(); uint32_t chunks = mem->chunks_per_row(); - if(ImGui::MenuItem("1-byte chunks", nullptr,(format == 1) ? true : false)) - mem->set_data_format(1); - if(ImGui::MenuItem("2-byte chunks", nullptr,(format == 2) ? true : false)) - mem->set_data_format(2); - if(ImGui::MenuItem("4-byte chunks", nullptr,(format == 4) ? true : false)) - mem->set_data_format(4); - if(ImGui::MenuItem("8-byte chunks", nullptr,(format == 8) ? true : false)) - mem->set_data_format(8); - if(ImGui::MenuItem("32-bit floating point", nullptr,(format == 9) ? true : false)) - mem->set_data_format(9); - if(ImGui::MenuItem("64-bit floating point", nullptr,(format == 10) ? true : false)) - mem->set_data_format(10); - if(ImGui::MenuItem("80-bit floating point", nullptr,(format == 11) ? true : false)) - mem->set_data_format(11); + if(ImGui::MenuItem("1-byte chunks", nullptr,(format == debug_view_memory::data_format::HEX_8BIT) ? true : false)) + mem->set_data_format(debug_view_memory::data_format::HEX_8BIT); + if(ImGui::MenuItem("2-byte chunks", nullptr,(format == debug_view_memory::data_format::HEX_16BIT) ? true : false)) + mem->set_data_format(debug_view_memory::data_format::HEX_16BIT); + if(ImGui::MenuItem("4-byte chunks", nullptr,(format == debug_view_memory::data_format::HEX_32BIT) ? true : false)) + mem->set_data_format(debug_view_memory::data_format::HEX_32BIT); + if(ImGui::MenuItem("8-byte chunks", nullptr,(format == debug_view_memory::data_format::HEX_64BIT) ? true : false)) + mem->set_data_format(debug_view_memory::data_format::HEX_64BIT); + if(ImGui::MenuItem("32-bit floating point", nullptr,(format == debug_view_memory::data_format::FLOAT_32BIT) ? true : false)) + mem->set_data_format(debug_view_memory::data_format::FLOAT_32BIT); + if(ImGui::MenuItem("64-bit floating point", nullptr,(format == debug_view_memory::data_format::FLOAT_64BIT) ? true : false)) + mem->set_data_format(debug_view_memory::data_format::FLOAT_64BIT); + if(ImGui::MenuItem("80-bit floating point", nullptr,(format == debug_view_memory::data_format::FLOAT_80BIT) ? true : false)) + mem->set_data_format(debug_view_memory::data_format::FLOAT_80BIT); ImGui::Separator(); if(ImGui::MenuItem("Logical addresses", nullptr,!physical)) mem->set_physical(false); -- cgit v1.2.3