summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/custui.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-11-25 01:55:53 +1100
committer Vas Crabb <vas@vastheman.com>2021-11-25 01:55:53 +1100
commitc378ea087097d75cd7f4fb69da062048eaaae5e6 (patch)
tree0711e315d3d2a7fc74cae27f6faea01a6af37f34 /src/frontend/mame/ui/custui.cpp
parent4e74563abb4c8b385baa72d0c2d5f3987fa88652 (diff)
A little more refactoring, and Coverity fixes:
* emu/ioport.h: Marked PORT_RESET deprecated. * emu/rendlay.cpp: Removed old dot matrix components. * emu/rendlay.cpp: Added warning message for reel components. * Changed a few more fruit machines to eliminate reel components; also made the reel lamps simpler and more efficient in these layouts. * emu, frontend: Fixed various errors reported by Coverity, one of which actaully breaks stuff.
Diffstat (limited to 'src/frontend/mame/ui/custui.cpp')
-rw-r--r--src/frontend/mame/ui/custui.cpp44
1 files changed, 14 insertions, 30 deletions
diff --git a/src/frontend/mame/ui/custui.cpp b/src/frontend/mame/ui/custui.cpp
index 62396d7840b..02da9310207 100644
--- a/src/frontend/mame/ui/custui.cpp
+++ b/src/frontend/mame/ui/custui.cpp
@@ -83,10 +83,10 @@ menu_custom_ui::menu_custom_ui(mame_ui_manager &mui, render_container &container
}
//-------------------------------------------------
-// dtor
+// menu dismissed
//-------------------------------------------------
-menu_custom_ui::~menu_custom_ui()
+void menu_custom_ui::menu_dismissed()
{
ui().options().set_value(OPTION_HIDE_PANELS, ui_globals::panels_status, OPTION_PRIORITY_CMDLINE);
@@ -375,10 +375,10 @@ void menu_font_ui::list()
}
//-------------------------------------------------
-// dtor
+// menu dismissed
//-------------------------------------------------
-menu_font_ui::~menu_font_ui()
+void menu_font_ui::menu_dismissed()
{
if (m_changed)
{
@@ -580,10 +580,10 @@ menu_colors_ui::menu_colors_ui(mame_ui_manager &mui, render_container &container
}
//-------------------------------------------------
-// dtor
+// menu dismissed
//-------------------------------------------------
-menu_colors_ui::~menu_colors_ui()
+void menu_colors_ui::menu_dismissed()
{
std::string dec_color;
for (int index = 1; index < MUI_RESTORE; index++)
@@ -607,7 +607,7 @@ void menu_colors_ui::handle(event const *ev)
{
if ((uintptr_t)ev->itemref != MUI_RESTORE)
{
- menu::stack_push<menu_rgb_ui>(ui(), container(), &m_color_table[(uintptr_t)ev->itemref].color, selected_item().text());
+ menu::stack_push<menu_rgb_ui>(ui(), container(), &m_color_table[(uintptr_t)ev->itemref].color, std::string(selected_item().text()));
}
else
{
@@ -803,26 +803,18 @@ void menu_colors_ui::restore_colors()
// ctor
//-------------------------------------------------
-menu_rgb_ui::menu_rgb_ui(mame_ui_manager &mui, render_container &container, rgb_t *_color, std::string _title)
- : menu(mui, container),
- m_color(_color),
- m_search(),
- m_key_active(false),
- m_lock_ref(0),
- m_title(_title)
+menu_rgb_ui::menu_rgb_ui(mame_ui_manager &mui, render_container &container, rgb_t *color, std::string &&title)
+ : menu(mui, container)
+ , m_color(color)
+ , m_search()
+ , m_key_active(false)
+ , m_lock_ref(0)
+ , m_title(std::move(title))
{
set_process_flags(PROCESS_LR_REPEAT);
}
//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-menu_rgb_ui::~menu_rgb_ui()
-{
-}
-
-//-------------------------------------------------
// handle
//-------------------------------------------------
@@ -1112,14 +1104,6 @@ menu_palette_sel::menu_palette_sel(mame_ui_manager &mui, render_container &conta
}
//-------------------------------------------------
-// dtor
-//-------------------------------------------------
-
-menu_palette_sel::~menu_palette_sel()
-{
-}
-
-//-------------------------------------------------
// handle
//-------------------------------------------------