diff --git a/src/devices/cpu/avr8/avr8.c b/src/devices/cpu/avr8/avr8.c index ebd880af285..063526ff472 100644 --- a/src/devices/cpu/avr8/avr8.c +++ b/src/devices/cpu/avr8/avr8.c @@ -752,7 +752,6 @@ void avr8_device::device_start() m_io = &space(AS_IO); // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", m_shifted_pc).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_r[AVR8_REGIDX_SREG]).callimport().callexport().formatstr("%8s").noshow(); state_add(AVR8_SREG, "STATUS", m_r[AVR8_REGIDX_SREG]).mask(0xff); diff --git a/src/devices/cpu/dsp56k/pmove.h b/src/devices/cpu/dsp56k/pmove.h index 8e30a534073..cb1bbe0f6f5 100644 --- a/src/devices/cpu/dsp56k/pmove.h +++ b/src/devices/cpu/dsp56k/pmove.h @@ -315,8 +315,6 @@ public: { INT8 b; reg_id SD; - std::string args; - b = (char)(word0 & 0x00ff); decode_HHH_table(BITSn(word1,0x0e00), SD); assemble_reg_from_W_table(BITSn(word1,0x0100), 'X', SD, b, m_source, m_destination); diff --git a/src/devices/cpu/e132xs/e132xs.c b/src/devices/cpu/e132xs/e132xs.c index f714f6f8a6b..deb7eedc587 100644 --- a/src/devices/cpu/e132xs/e132xs.c +++ b/src/devices/cpu/e132xs/e132xs.c @@ -1562,7 +1562,6 @@ void hyperstone_device::init(int scale_mask) m_clock_scale_mask = scale_mask; // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", m_global_regs[0]).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_global_regs[1]).callimport().callexport().formatstr("%40s").noshow(); state_add(E132XS_PC, "PC", m_global_regs[0]).mask(0xffffffff); diff --git a/src/devices/cpu/esrip/esrip.c b/src/devices/cpu/esrip/esrip.c index fa7ab139b08..07abb25d053 100644 --- a/src/devices/cpu/esrip/esrip.c +++ b/src/devices/cpu/esrip/esrip.c @@ -193,7 +193,6 @@ void esrip_device::device_start() m_direct = &m_program->direct(); // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", m_rip_pc).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_status).callimport().callexport().formatstr("%8s").noshow(); state_add(ESRIP_PC, "PC:", m_rip_pc).mask(0xffff); diff --git a/src/devices/cpu/m6805/m6805.c b/src/devices/cpu/m6805/m6805.c index b7fc47c8dfc..f6de7d06351 100644 --- a/src/devices/cpu/m6805/m6805.c +++ b/src/devices/cpu/m6805/m6805.c @@ -424,7 +424,6 @@ void m6805_base_device::device_start() m_icountptr = &m_icount; // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", m_pc.w.l).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_cc).callimport().callexport().formatstr("%8s").noshow(); state_add(M6805_A, "A", m_a).mask(0xff); diff --git a/src/devices/cpu/ssem/ssem.c b/src/devices/cpu/ssem/ssem.c index aae760aa26d..0b2af498b95 100644 --- a/src/devices/cpu/ssem/ssem.c +++ b/src/devices/cpu/ssem/ssem.c @@ -100,7 +100,6 @@ void ssem_device::device_start() m_program = &space(AS_PROGRAM); // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", m_pc).noshow(); state_add(STATE_GENFLAGS, "GENFLAGS", m_halt).callimport().callexport().formatstr("%1s").noshow(); state_add(SSEM_PC, "PC", m_shifted_pc).mask(0xffff); diff --git a/src/devices/cpu/upd7725/upd7725.c b/src/devices/cpu/upd7725/upd7725.c index d422eae21b0..ce78b447f59 100644 --- a/src/devices/cpu/upd7725/upd7725.c +++ b/src/devices/cpu/upd7725/upd7725.c @@ -69,7 +69,6 @@ void necdsp_device::device_start() m_direct = &m_program->direct(); // register our state for the debugger - std::string tempstr; state_add(STATE_GENPC, "GENPC", regs.pc).noshow(); state_add(UPD7725_PC, "PC", regs.pc); state_add(UPD7725_RP, "RP", regs.rp); diff --git a/src/devices/machine/r10696.c b/src/devices/machine/r10696.c index ab20caed731..819d31084e9 100644 --- a/src/devices/machine/r10696.c +++ b/src/devices/machine/r10696.c @@ -154,7 +154,7 @@ READ8_MEMBER( r10696_device::io_r ) io_a = m_iord(0); io_b = m_iord(1); io_c = m_iord(2); - data = (io_a | io_b | io_a) & 0x0f; + data = (io_a | io_b | io_c) & 0x0f; break; case 0x01: // Read Groups B | C io_b = m_iord(1); diff --git a/src/emu/diimage.c b/src/emu/diimage.c index e4c40167114..46544595475 100644 --- a/src/emu/diimage.c +++ b/src/emu/diimage.c @@ -758,7 +758,6 @@ bool device_image_interface::load_software(software_list_device &swlist, const c { std::string locationtag, breakstr("%"); const rom_entry *region; - std::string regiontag; bool retVal = FALSE; int warningcount = 0; for (region = start; region != NULL; region = rom_next_region(region)) diff --git a/src/emu/emuopts.c b/src/emu/emuopts.c index 148facf5cc4..0a71dd3afe5 100644 --- a/src/emu/emuopts.c +++ b/src/emu/emuopts.c @@ -582,7 +582,7 @@ const char *emu_options::sub_value(std::string &buffer, const char *name, const { std::string tmp = std::string(",").append(subname).append("="); buffer = value(name); - int pos = buffer.find(tmp.c_str()); + int pos = buffer.find(tmp); if (pos != -1) { int endpos = buffer.find_first_of(',', pos + 1); diff --git a/src/emu/info.c b/src/emu/info.c index 25ea424130f..8cdf12f1ded 100644 --- a/src/emu/info.c +++ b/src/emu/info.c @@ -645,7 +645,7 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag) if (strcmp(exec->device().tag(), device.tag())) { std::string newtag(exec->device().tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); fprintf(m_output, "\t\tdevice().tag(), device.tag())) { std::string newtag(sound->device().tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); fprintf(m_output, "\t\ttag(), device.tag())) { std::string newtag(screendev->tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); fprintf(m_output, "\t\ttag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); // output the switch name information std::string normalized_field_name(xml_normalize_string(field->name())); @@ -1228,7 +1228,7 @@ void info_xml_creator::output_images(device_t &device, const char *root_tag) if (strcmp(imagedev->device().tag(), device.tag())) { std::string newtag(imagedev->device().tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); // print m_output device type fprintf(m_output, "\t\timage_type_name())); @@ -1286,7 +1286,7 @@ void info_xml_creator::output_slots(device_t &device, const char *root_tag) if (strcmp(slot->device().tag(), device.tag())) { std::string newtag(slot->device().tag()), oldtag(":"); - newtag = newtag.substr(newtag.find(oldtag.append(root_tag).c_str()) + oldtag.length()); + newtag = newtag.substr(newtag.find(oldtag.append(root_tag)) + oldtag.length()); // print m_output device type fprintf(m_output, "\t\t\n", xml_normalize_string(newtag.c_str())); diff --git a/src/emu/machine.c b/src/emu/machine.c index ae85784ed46..16f038e6eb9 100644 --- a/src/emu/machine.c +++ b/src/emu/machine.c @@ -206,7 +206,7 @@ TIMER_CALLBACK_MEMBER(running_machine::autoboot_callback) else if (strlen(options().autoboot_command())!=0) { std::string cmd = std::string(options().autoboot_command()); strreplace(cmd, "'", "\\'"); - std::string val = std::string("emu.keypost('").append(cmd.c_str()).append("')").c_str(); + std::string val = std::string("emu.keypost('").append(cmd).append("')"); manager().lua()->load_string(val.c_str()); } } @@ -563,7 +563,7 @@ std::string running_machine::get_statename(const char *option) // handle %d in the template (for image devices) std::string statename_dev("%d_"); - int pos = statename_str.find(statename_dev.c_str()); + int pos = statename_str.find(statename_dev); if (pos != -1) { diff --git a/src/emu/memory.c b/src/emu/memory.c index bf251912004..7a9e3688995 100644 --- a/src/emu/memory.c +++ b/src/emu/memory.c @@ -1929,8 +1929,6 @@ void address_space::populate_from_map(address_map *map) void address_space::populate_map_entry(const address_map_entry &entry, read_or_write readorwrite) { const map_handler_data &data = (readorwrite == ROW_READ) ? entry.m_read : entry.m_write; - std::string fulltag; - // based on the handler type, alter the bits, name, funcptr, and object switch (data.m_type) { diff --git a/src/emu/romload.c b/src/emu/romload.c index fe3104d7f8a..2e64fe20c58 100644 --- a/src/emu/romload.c +++ b/src/emu/romload.c @@ -675,7 +675,7 @@ static int open_rom_file(romload_private *romdata, const char *regiontag, const } // prepare locations where we have to load from: list/parentname & list/clonename - std::string swlist(tag1.c_str()); + std::string swlist(tag1); tag2.assign(swlist.append(tag4)); if (has_parent) { @@ -1076,7 +1076,7 @@ int open_disk_image(emu_options &options, const game_driver *gamedrv, const rom_ } // prepare locations where we have to load from: list/parentname (if any) & list/clonename - std::string swlist(tag1.c_str()); + std::string swlist(tag1); tag2.assign(swlist.append(tag4)); if (has_parent) { diff --git a/src/emu/softlist.c b/src/emu/softlist.c index c2e8dba671a..c90bb6cccdc 100644 --- a/src/emu/softlist.c +++ b/src/emu/softlist.c @@ -158,7 +158,7 @@ bool software_part::is_compatible(const software_list_device &swlistdev) const for (int start = 0, end = filt.find_first_of(',',start); end != -1; start = end + 1, end = filt.find_first_of(',', start)) { std::string token(filt, start, end - start + 1); - if (comp.find(token.c_str()) != -1) + if (comp.find(token) != -1) return true; } return false; @@ -181,7 +181,7 @@ bool software_part::matches_interface(const char *interface_list) const // then add a comma to the end of our interface and return true if we find it in the list string std::string our_interface = std::string(m_interface).append(","); - return (interfaces.find(our_interface.c_str()) != -1); + return (interfaces.find(our_interface) != -1); } diff --git a/src/emu/ui/filemngr.c b/src/emu/ui/filemngr.c index 5e02b657cd0..55070364014 100644 --- a/src/emu/ui/filemngr.c +++ b/src/emu/ui/filemngr.c @@ -104,7 +104,6 @@ void ui_menu_file_manager::populate() { std::string buffer, tmp_inst, tmp_name; bool first_entry = true; - std::string prev_owner; if (!m_warnings.empty()) { diff --git a/src/emu/ui/inputmap.c b/src/emu/ui/inputmap.c index 9aa63fdcec9..375c59075b6 100644 --- a/src/emu/ui/inputmap.c +++ b/src/emu/ui/inputmap.c @@ -91,7 +91,6 @@ void ui_menu_input_general::populate() { input_item_data *itemlist = NULL; int suborder[SEQ_TYPE_TOTAL]; - std::string tempstring; int sortorder = 1; /* create a mini lookup table for sort order based on sequence type */ @@ -154,7 +153,6 @@ void ui_menu_input_specific::populate() { input_item_data *itemlist = NULL; int suborder[SEQ_TYPE_TOTAL]; - std::string tempstring; int port_count = 0; /* create a mini lookup table for sort order based on sequence type */ diff --git a/src/emu/validity.c b/src/emu/validity.c index 7dbe67206a0..45f39ff444f 100644 --- a/src/emu/validity.c +++ b/src/emu/validity.c @@ -196,7 +196,6 @@ bool validity_checker::check_all() // if we had warnings or errors, output if (m_errors > 0 || m_warnings > 0) { - std::string tempstr; output_via_delegate(OSD_OUTPUT_CHANNEL_ERROR, "Core: %d errors, %d warnings\n", m_errors, m_warnings); if (m_errors > 0) { diff --git a/src/emu/video.c b/src/emu/video.c index adc2888b2e7..bdeb0d33faf 100644 --- a/src/emu/video.c +++ b/src/emu/video.c @@ -1126,7 +1126,7 @@ file_error video_manager::open_next(emu_file &file, const char *extension) // handle %d in the template (for image devices) std::string snapdev("%d_"); - int pos = snapstr.find(snapdev.c_str()); + int pos = snapstr.find(snapdev); if (pos != -1) { diff --git a/src/mame/machine/315-5881_crypt.c b/src/mame/machine/315-5881_crypt.c index 7997000400d..ec07d1c8380 100644 --- a/src/mame/machine/315-5881_crypt.c +++ b/src/mame/machine/315-5881_crypt.c @@ -47,7 +47,7 @@ void sega_315_5881_crypt_device::device_start() save_item(NAME(line_buffer_pos)); save_item(NAME(line_buffer_size)); - std::string skey = parameter("key").c_str(); + std::string skey = parameter("key"); if(!skey.empty()) key = strtoll(skey.c_str(), 0, 16); else diff --git a/src/mame/machine/naomim1.c b/src/mame/machine/naomim1.c index 86f0119f578..84d2db5ecef 100644 --- a/src/mame/machine/naomim1.c +++ b/src/mame/machine/naomim1.c @@ -32,7 +32,7 @@ void naomi_m1_board::device_start() { naomi_board::device_start(); - std::string skey = parameter("key").c_str(); + std::string skey = parameter("key"); if(!skey.empty()) key = strtoll(skey.c_str(), 0, 16); else