summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/drivenum.cpp
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-12-03 11:40:45 +0100
committer Miodrag Milanovic <mmicko@gmail.com>2015-12-03 11:40:45 +0100
commit92f81361d64c720addf5d7e2528b3d1c675f65a4 (patch)
tree6640e797a7dd924e20f10ab0f009257e1d751fc8 /src/emu/drivenum.cpp
parent39afa0533a1349566aa7f144e042b24227285e9f (diff)
Initial conversion of core to C++14. Note that compilers are now limited to GCC 4.9.0 and up, Clang 3.4.0 and up, and VS2013 and up [Miodrag Milanovic]
Diffstat (limited to 'src/emu/drivenum.cpp')
-rw-r--r--src/emu/drivenum.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/emu/drivenum.cpp b/src/emu/drivenum.cpp
index 62fffe13d40..b504366f12d 100644
--- a/src/emu/drivenum.cpp
+++ b/src/emu/drivenum.cpp
@@ -189,17 +189,7 @@ machine_config &driver_enumerator::config(int index, emu_options &options) const
// if we don't have it cached, add it
if (m_config[index] == NULL)
{
- // if our cache is full, release the head entry
- if (m_config_cache.count() == CONFIG_CACHE_COUNT)
- {
- config_entry *first = m_config_cache.first();
- m_config[first->index()] = NULL;
- m_config_cache.remove(*first);
- }
-
- // allocate the config and add it to the end of the list
- machine_config *config = m_config[index] = global_alloc(machine_config(*s_drivers_sorted[index], options));
- m_config_cache.append(*global_alloc(config_entry(*config, index)));
+ m_config[index] = std::make_unique<machine_config>(*s_drivers_sorted[index], options);
}
return *m_config[index];
}