emu/machine.cpp: Get rid of remaining make_unique_clear on 'manager' objects.

This commit is contained in:
Vas Crabb 2020-09-30 20:53:42 +10:00
parent 3a95d1e4fd
commit 5bb5c31345
4 changed files with 19 additions and 6 deletions

View File

@ -327,6 +327,7 @@ void render_crosshair::draw(render_container &container, u8 fade)
crosshair_manager::crosshair_manager(running_machine &machine) crosshair_manager::crosshair_manager(running_machine &machine)
: m_machine(machine) : m_machine(machine)
, m_usage(false) , m_usage(false)
, m_fade(0)
, m_animation_counter(0) , m_animation_counter(0)
, m_auto_time(CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT) , m_auto_time(CROSSHAIR_VISIBILITY_AUTOTIME_DEFAULT)
{ {

View File

@ -199,7 +199,7 @@ void running_machine::start()
m_soft_reset_timer = m_scheduler.timer_alloc(timer_expired_delegate(FUNC(running_machine::soft_reset), this)); m_soft_reset_timer = m_scheduler.timer_alloc(timer_expired_delegate(FUNC(running_machine::soft_reset), this));
// initialize UI input // initialize UI input
m_ui_input = make_unique_clear<ui_input_manager>(*this); m_ui_input = std::make_unique<ui_input_manager>(*this);
// init the osd layer // init the osd layer
m_manager.osd().init(*this); m_manager.osd().init(*this);
@ -230,7 +230,7 @@ void running_machine::start()
// needs rom bases), and finally initialize CPUs (which needs // needs rom bases), and finally initialize CPUs (which needs
// complete address spaces). These operations must proceed in this // complete address spaces). These operations must proceed in this
// order // order
m_rom_load = make_unique_clear<rom_load_manager>(*this); m_rom_load = std::make_unique<rom_load_manager>(*this);
m_memory.initialize(); m_memory.initialize();
// save the random seed or save states might be broken in drivers that use the rand() method // save the random seed or save states might be broken in drivers that use the rand() method
@ -239,7 +239,7 @@ void running_machine::start()
// initialize image devices // initialize image devices
m_image = std::make_unique<image_manager>(*this); m_image = std::make_unique<image_manager>(*this);
m_tilemap = std::make_unique<tilemap_manager>(*this); m_tilemap = std::make_unique<tilemap_manager>(*this);
m_crosshair = make_unique_clear<crosshair_manager>(*this); m_crosshair = std::make_unique<crosshair_manager>(*this);
m_network = std::make_unique<network_manager>(*this); m_network = std::make_unique<network_manager>(*this);
// initialize the debugger // initialize the debugger

View File

@ -1418,6 +1418,17 @@ void rom_load_manager::process_region_list()
rom_load_manager::rom_load_manager(running_machine &machine) rom_load_manager::rom_load_manager(running_machine &machine)
: m_machine(machine) : m_machine(machine)
, m_warnings(0)
, m_knownbad(0)
, m_errors(0)
, m_romsloaded(0)
, m_romstotal(0)
, m_romsloadedsize(0)
, m_romstotalsize(0)
, m_chd_list()
, m_region(nullptr)
, m_errorstring()
, m_softwarningstring()
{ {
// figure out which BIOS we are using // figure out which BIOS we are using
std::map<std::string, std::string> card_bios; std::map<std::string, std::string> card_bios;

View File

@ -37,14 +37,15 @@ ui_input_manager::ui_input_manager(running_machine &machine)
: m_machine(machine) : m_machine(machine)
, m_presses_enabled(true) , m_presses_enabled(true)
, m_current_mouse_target(nullptr) , m_current_mouse_target(nullptr)
, m_current_mouse_x(-1)
, m_current_mouse_y(-1)
, m_current_mouse_down(false) , m_current_mouse_down(false)
, m_current_mouse_field(nullptr) , m_current_mouse_field(nullptr)
, m_events_start(0) , m_events_start(0)
, m_events_end(0) , m_events_end(0)
{ {
// create the private data std::fill(std::begin(m_next_repeat), std::end(m_next_repeat), 0);
m_current_mouse_x = -1; std::fill(std::begin(m_seqpressed), std::end(m_seqpressed), 0);
m_current_mouse_y = -1;
// add a frame callback to poll inputs // add a frame callback to poll inputs
machine.add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(&ui_input_manager::frame_update, this)); machine.add_notifier(MACHINE_NOTIFY_FRAME, machine_notify_delegate(&ui_input_manager::frame_update, this));