diff options
author | 2011-04-19 04:26:02 +0000 | |
---|---|---|
committer | 2011-04-19 04:26:02 +0000 | |
commit | 3628e7eaedd083da8d876a618a0af8486b114c55 (patch) | |
tree | 862627b0a90fbdee6058987ca15e412165217eb9 /src | |
parent | 5e443744c56bf5f5f6095a130e13be390d33ad01 (diff) |
Clean up code, adapt to existing coding style.
Diffstat (limited to 'src')
-rw-r--r-- | src/emu/audit.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/emu/audit.c b/src/emu/audit.c index a630611a404..08141355d70 100644 --- a/src/emu/audit.c +++ b/src/emu/audit.c @@ -81,8 +81,8 @@ const char *driverpath = m_enumerator.config().m_devicelist.find("root")->search // iterate over ROM sources and regions int found = 0; int required = 0; - int sharedFound = 0; - int sharedRequired = 0; + int shared_found = 0; + int shared_required = 0; for (const rom_source *source = rom_first_source(m_enumerator.config()); source != NULL; source = rom_next_source(*source)) { // determine the search path for this source and iterate through the regions @@ -95,27 +95,22 @@ const char *driverpath = m_enumerator.config().m_devicelist.find("root")->search for (const rom_entry *region = rom_first_region(*source); region != NULL; region = rom_next_region(region)) { // temporary hack: add the driver path & region name -astring combinedpath(m_searchpath, ";", driverpath); -if(ROMREGION_ISLOADBYNAME(region)) -{ - combinedpath=combinedpath.cat(";"); - combinedpath=combinedpath.cat(ROMREGION_GETTAG(region)); -} +astring combinedpath(source->searchpath(), ";", driverpath); +if (ROMREGION_ISLOADBYNAME(region)) + combinedpath.cat(";").cat(ROMREGION_GETTAG(region)); m_searchpath = combinedpath; for (const rom_entry *rom = rom_first_file(region); rom; rom = rom_next_file(rom)) { hash_collection hashes(ROM_GETHASHDATA(rom)); - bool shared = also_used_by_parent(hashes) >= 0; + bool shared = (also_used_by_parent(hashes) != -1); // if a dump exists, then at least one entry is required if (!hashes.flag(hash_collection::FLAG_NO_DUMP)) { required++; if (shared) - { - sharedRequired++; - } + shared_required++; } // audit a file @@ -136,16 +131,14 @@ m_searchpath = combinedpath; { found++; if (shared) - { - sharedFound++; - } + shared_found++; } } } } // if we found nothing unique to this set & the set needs roms that aren't in the parent or the parent isn't found either, then we don't have the set at all - if (found == sharedFound && required > 0 && (required != sharedRequired || sharedFound == 0)) + if (found == shared_found && required > 0 && (required != shared_required || shared_found == 0)) m_record_list.reset(); // return a summary |