diff options
Diffstat (limited to 'src/emu/validity.c')
-rw-r--r-- | src/emu/validity.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/emu/validity.c b/src/emu/validity.c index 887dd76e123..bd5c0702662 100644 --- a/src/emu/validity.c +++ b/src/emu/validity.c @@ -198,16 +198,16 @@ void validity_checker::check_all() // if we had warnings or errors, output if (m_errors > 0 || m_warnings > 0) { - astring tempstr; + std::string tempstr; output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Core: %d errors, %d warnings\n", m_errors, m_warnings); if (m_errors > 0) { - m_error_text.replace("\n", "\n "); + strreplace(m_error_text, "\n", "\n "); output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Errors:\n %s", m_error_text.c_str()); } if (m_warnings > 0) { - m_warning_text.replace("\n", "\n "); + strreplace(m_warning_text, "\n", "\n "); output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Warnings:\n %s", m_warning_text.c_str()); } output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "\n"); @@ -276,8 +276,8 @@ void validity_checker::validate_one(const game_driver &driver) // reset error/warning state int start_errors = m_errors; int start_warnings = m_warnings; - m_error_text.reset(); - m_warning_text.reset(); + m_error_text.clear(); + m_warning_text.clear(); // wrap in try/except to catch fatalerrors try @@ -298,16 +298,16 @@ void validity_checker::validate_one(const game_driver &driver) // if we had warnings or errors, output if (m_errors > start_errors || m_warnings > start_warnings) { - astring tempstr; + std::string tempstr; output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Driver %s (file %s): %d errors, %d warnings\n", driver.name, core_filename_extract_base(tempstr, driver.source_file).c_str(), m_errors - start_errors, m_warnings - start_warnings); if (m_errors > start_errors) { - m_error_text.replace("\n", "\n "); + strreplace(m_error_text, "\n", "\n "); output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Errors:\n %s", m_error_text.c_str()); } if (m_warnings > start_warnings) { - m_warning_text.replace("\n", "\n "); + strreplace(m_warning_text, "\n", "\n "); output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Warnings:\n %s", m_warning_text.c_str()); } output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "\n"); @@ -519,7 +519,7 @@ void validity_checker::validate_inlines() void validity_checker::validate_driver() { // check for duplicate names - astring tempstr; + std::string tempstr; if (m_names_map.add(m_current_driver->name, m_current_driver, false) == TMERR_DUPLICATE) { const game_driver *match = m_names_map.find(m_current_driver->name); @@ -878,7 +878,7 @@ void validity_checker::validate_inputs() // allocate the input ports ioport_list portlist; - astring errorbuf; + std::string errorbuf; portlist.append(*device, errorbuf); // report any errors during construction @@ -1008,8 +1008,8 @@ void validity_checker::validate_devices() { for (const device_slot_option *option = slot->first_option(); option != NULL; option = option->next()) { - astring temptag("_"); - temptag.cat(option->name()); + std::string temptag("_"); + temptag.append(option->name()); device_t *dev = const_cast<machine_config &>(*m_current_config).device_add(&m_current_config->root_device(), temptag.c_str(), option->devtype(), 0); // notify this device and all its subdevices that they are now configured @@ -1036,18 +1036,18 @@ void validity_checker::validate_devices() // and device //------------------------------------------------- -void validity_checker::build_output_prefix(astring &str) +void validity_checker::build_output_prefix(std::string &str) { // start empty - str.reset(); + str.clear(); // if we have a current device, indicate that if (m_current_device != NULL) - str.cat(m_current_device->name()).cat(" device '").cat(m_current_device->tag()).cat("': "); + str.append(m_current_device->name()).append(" device '").append(m_current_device->tag()).append("': "); // if we have a current port, indicate that as well if (m_current_ioport != NULL) - str.cat("ioport '").cat(m_current_ioport).cat("': "); + str.append("ioport '").append(m_current_ioport).append("': "); } @@ -1057,7 +1057,7 @@ void validity_checker::build_output_prefix(astring &str) void validity_checker::output_callback(osd_output_channel channel, const char *msg, va_list args) { - astring output; + std::string output; switch (channel) { case OSD_OUTPUT_CHANNEL_ERROR: @@ -1068,8 +1068,8 @@ void validity_checker::output_callback(osd_output_channel channel, const char *m build_output_prefix(output); // generate the string - output.catvprintf(msg, args); - m_error_text.cat(output); + strcatvprintf(output, msg, args); + m_error_text.append(output); break; case OSD_OUTPUT_CHANNEL_WARNING: // count the error @@ -1079,8 +1079,8 @@ void validity_checker::output_callback(osd_output_channel channel, const char *m build_output_prefix(output); // generate the string and output to the original target - output.catvprintf(msg, args); - m_warning_text.cat(output); + strcatvprintf(output, msg, args); + m_warning_text.append(output); break; default: chain_output(channel, msg, args); |