summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/softlist_dev.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2019-01-19 19:37:12 +1100
committer Vas Crabb <vas@vastheman.com>2019-01-19 19:37:12 +1100
commite147e5ae97f4f3925bbc45453d5bad079fb9fc87 (patch)
tree618b485863a52d4eca32baafa2e135cd32aaf257 /src/emu/softlist_dev.cpp
parent4bea46bec7553159f4fb49ed3986ec45d8caa848 (diff)
restore functionality of the "Add to Favorites" item on the main in-emulation menu
Diffstat (limited to 'src/emu/softlist_dev.cpp')
-rw-r--r--src/emu/softlist_dev.cpp22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/emu/softlist_dev.cpp b/src/emu/softlist_dev.cpp
index e1539523dcb..b96fd63b3fa 100644
--- a/src/emu/softlist_dev.cpp
+++ b/src/emu/softlist_dev.cpp
@@ -255,18 +255,16 @@ const software_info *software_list_device::find(const std::string &look_for)
// find a match (will cause a parse if needed when calling get_info)
const auto &info_list = get_info();
auto iter = std::find_if(
- info_list.begin(),
- info_list.end(),
- [&](const software_info &info)
- {
- const char *shortname = info.shortname().c_str();
- return (iswild && core_strwildcmp(look_for.c_str(), shortname) == 0)
- || core_stricmp(look_for.c_str(), shortname) == 0;
- });
-
- return iter != info_list.end()
- ? &*iter
- : nullptr;
+ info_list.begin(),
+ info_list.end(),
+ [&look_for, iswild] (const software_info &info)
+ {
+ const char *shortname = info.shortname().c_str();
+ return (iswild && core_strwildcmp(look_for.c_str(), shortname) == 0)
+ || core_stricmp(look_for.c_str(), shortname) == 0;
+ });
+
+ return iter != info_list.end() ? &*iter : nullptr;
}