mirror of
https://github.com/holub/mame
synced 2025-04-25 17:56:43 +03:00
Merge pull request #1188 from npwoods/more_diimage_stdstring
More conversion of 'const char *' --> std::string in diimage
This commit is contained in:
commit
9342233fda
@ -398,13 +398,13 @@ void device_image_interface::setup_working_directory()
|
||||
// valid even if not mounted
|
||||
//-------------------------------------------------
|
||||
|
||||
const char * device_image_interface::working_directory()
|
||||
const std::string &device_image_interface::working_directory()
|
||||
{
|
||||
// check to see if we've never initialized the working directory
|
||||
if (m_working_directory.empty())
|
||||
setup_working_directory();
|
||||
|
||||
return m_working_directory.c_str();
|
||||
return m_working_directory;
|
||||
}
|
||||
|
||||
|
||||
|
@ -195,9 +195,9 @@ public:
|
||||
// configuration access
|
||||
void set_init_phase() { m_init_phase = true; }
|
||||
|
||||
const char* longname() const { return m_longname.c_str(); }
|
||||
const char* manufacturer() const { return m_manufacturer.c_str(); }
|
||||
const char* year() const { return m_year.c_str(); }
|
||||
const std::string &longname() const { return m_longname; }
|
||||
const std::string &manufacturer() const { return m_manufacturer; }
|
||||
const std::string &year() const { return m_year; }
|
||||
UINT32 supported() const { return m_supported; }
|
||||
|
||||
const software_info *software_entry() const { return m_software_info_ptr; }
|
||||
@ -206,7 +206,7 @@ public:
|
||||
bool loaded_through_softlist() const { return m_software_info_ptr != nullptr; }
|
||||
|
||||
void set_working_directory(const char *working_directory) { m_working_directory = working_directory; }
|
||||
const char * working_directory();
|
||||
const std::string &working_directory();
|
||||
|
||||
UINT8 *get_software_region(const char *tag);
|
||||
UINT32 get_software_region_length(const char *tag);
|
||||
|
@ -145,7 +145,7 @@ void image_manager::config_save(config_type cfg_type, xml_data_node *parentnode)
|
||||
if (node != nullptr)
|
||||
{
|
||||
xml_set_attribute(node, "instance", dev_instance);
|
||||
xml_set_attribute(node, "directory", image.working_directory());
|
||||
xml_set_attribute(node, "directory", image.working_directory().c_str());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ menu_control_device_image::menu_control_device_image(mame_ui_manager &mui, rende
|
||||
if (m_swi != nullptr)
|
||||
{
|
||||
m_state = START_OTHER_PART;
|
||||
m_current_directory.assign(m_image.working_directory());
|
||||
m_current_directory = m_image.working_directory();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -65,7 +65,7 @@ menu_control_device_image::menu_control_device_image(mame_ui_manager &mui, rende
|
||||
}
|
||||
else
|
||||
{
|
||||
m_current_directory.assign(m_image.working_directory());
|
||||
m_current_directory = m_image.working_directory();
|
||||
}
|
||||
|
||||
// check to see if the path exists; if not clear it
|
||||
|
@ -195,10 +195,10 @@ void favorite_manager::add_favorite_game()
|
||||
auto part = image.part_entry();
|
||||
ui_software_info tmpmatches;
|
||||
tmpmatches.shortname = swinfo->shortname();
|
||||
tmpmatches.longname = strensure(image.longname());
|
||||
tmpmatches.longname = image.longname();
|
||||
tmpmatches.parentname = swinfo->parentname();
|
||||
tmpmatches.year = strensure(image.year());
|
||||
tmpmatches.publisher = strensure(image.manufacturer());
|
||||
tmpmatches.year = image.year();
|
||||
tmpmatches.publisher = image.manufacturer();
|
||||
tmpmatches.supported = image.supported();
|
||||
tmpmatches.part = part->name();
|
||||
tmpmatches.driver = &machine().system();
|
||||
|
Loading…
Reference in New Issue
Block a user