Previous 199869 Revisions Next

r29415 Monday 7th April, 2014 at 09:46:36 UTC by Oliver Stöneberg
optimized software_list_device::find() a bit - speeds up -validate for MESS (nw)
[src/emu]softlist.c

trunk/src/emu/softlist.c
r29414r29415
539539   if (look_for == NULL)
540540      return NULL;
541541
542   bool iswild = strchr(look_for, '*') != NULL || strchr(look_for, '?');
543
542544   // find a match (will cause a parse if needed when calling first_software_info)
543545   for (prev = (prev != NULL) ? prev->next() : first_software_info(); prev != NULL; prev = prev->next())
544      if (core_strwildcmp(look_for, prev->shortname()) == 0)
546      if ((iswild && core_strwildcmp(look_for, prev->shortname()) == 0) || core_stricmp(look_for, prev->shortname()) == 0)
545547         break;
546548
547549   return prev;

Previous 199869 Revisions Next


© 1997-2024 The MAME Team