diff options
Diffstat (limited to 'src/emu/config.cpp')
-rw-r--r-- | src/emu/config.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/emu/config.cpp b/src/emu/config.cpp index 3574eb2d12e..81a486f73af 100644 --- a/src/emu/config.cpp +++ b/src/emu/config.cpp @@ -40,8 +40,8 @@ void configuration_manager::config_register(const char* nodename, config_load_de { config_element element; element.name = nodename; - element.load = load; - element.save = save; + element.load = std::move(load); + element.save = std::move(save); m_typelist.push_back(element); } @@ -60,7 +60,7 @@ int configuration_manager::load_settings() int loaded = 0; /* loop over all registrants and call their init function */ - for (auto type : m_typelist) + for (const auto &type : m_typelist) type.load(config_type::INIT, nullptr); /* now load the controller file */ @@ -93,7 +93,7 @@ int configuration_manager::load_settings() loaded = load_xml(file, config_type::GAME); /* loop over all registrants and call their final function */ - for (auto type : m_typelist) + for (const auto &type : m_typelist) type.load(config_type::FINAL, nullptr); /* if we didn't find a saved config, return 0 so the main core knows that it */ @@ -105,7 +105,7 @@ int configuration_manager::load_settings() void configuration_manager::save_settings() { /* loop over all registrants and call their init function */ - for (auto type : m_typelist) + for (const auto &type : m_typelist) type.save(config_type::INIT, nullptr); /* save the defaults file */ @@ -120,7 +120,7 @@ void configuration_manager::save_settings() save_xml(file, config_type::GAME); /* loop over all registrants and call their final function */ - for (auto type : m_typelist) + for (const auto &type : m_typelist) type.save(config_type::FINAL, nullptr); } @@ -204,7 +204,7 @@ int configuration_manager::load_xml(emu_file &file, config_type which_type) osd_printf_debug("Entry: %s -- processing\n", name); /* loop over all registrants and call their load function */ - for (auto type : m_typelist) + for (const auto &type : m_typelist) type.load(which_type, systemnode->get_child(type.name.c_str())); count++; } @@ -246,7 +246,7 @@ int configuration_manager::save_xml(emu_file &file, config_type which_type) /* create the input node and write it out */ /* loop over all registrants and call their save function */ - for (auto type : m_typelist) + for (const auto &type : m_typelist) { util::xml::data_node *const curnode = systemnode->add_child(type.name.c_str(), nullptr); if (!curnode) |