From 793aef603948460d12927fe0a31b7f5caf658575 Mon Sep 17 00:00:00 2001 From: MASH Date: Wed, 16 Dec 2015 01:35:53 +0100 Subject: [PATCH] Replaced strlen(device->shortname())!=0 with device->shortname()[0]!='\0' in info.cpp Increased listxml output ==> 18% --- src/emu/info.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/emu/info.cpp b/src/emu/info.cpp index 92fb56da4e5..e48726fbe0f 100644 --- a/src/emu/info.cpp +++ b/src/emu/info.cpp @@ -394,7 +394,7 @@ void info_xml_creator::output_devices() device_iterator deviter(m_drivlist.config().root_device()); for (device_t *device = deviter.first(); device != nullptr; device = deviter.next()) { - if (device->owner() != nullptr && device->shortname()!= nullptr && strlen(device->shortname())!=0) + if (device->owner() != nullptr && device->shortname()!= nullptr && device->shortname()[0]!='\0') { if (shortnames.insert(device->shortname()).second) output_one_device(*device, device->tag()); @@ -424,7 +424,7 @@ void info_xml_creator::output_devices() device_iterator deviter2(*dev); for (device_t *device = deviter2.first(); device != nullptr; device = deviter2.next()) { - if (device->owner() == dev && device->shortname()!= nullptr && strlen(device->shortname())!=0) + if (device->owner() == dev && device->shortname()!= nullptr && device->shortname()[0]!='\0') { if (shortnames.insert(device->shortname()).second) output_one_device(*device, device->tag()); @@ -447,7 +447,7 @@ void info_xml_creator::output_device_roms() { device_iterator deviter(m_drivlist.config().root_device()); for (device_t *device = deviter.first(); device != nullptr; device = deviter.next()) - if (device->owner() != nullptr && device->shortname()!= nullptr && strlen(device->shortname())!=0) + if (device->owner() != nullptr && device->shortname()!= nullptr && device->shortname()[0]!='\0') fprintf(m_output, "\t\t\n", xml_normalize_string(device->shortname())); }