mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
removed not needed conversions (nw)
This commit is contained in:
parent
bcc51297e6
commit
42d672722d
@ -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);
|
||||
|
@ -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\t<chip");
|
||||
fprintf(m_output, " type=\"cpu\"");
|
||||
@ -663,7 +663,7 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag)
|
||||
if (strcmp(sound->device().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\t<chip");
|
||||
fprintf(m_output, " type=\"audio\"");
|
||||
@ -691,7 +691,7 @@ void info_xml_creator::output_display(device_t &device, const char *root_tag)
|
||||
if (strcmp(screendev->tag(), 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\t<display");
|
||||
fprintf(m_output, " tag=\"%s\"", xml_normalize_string(newtag.c_str()));
|
||||
@ -1097,7 +1097,7 @@ void info_xml_creator::output_switches(const ioport_list &portlist, const char *
|
||||
std::string output;
|
||||
|
||||
std::string newtag(port->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());
|
||||
|
||||
// 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\t<device type=\"%s\"", xml_normalize_string(imagedev->image_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<slot name=\"%s\">\n", xml_normalize_string(newtag.c_str()));
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user