mirror of
https://github.com/holub/mame
synced 2025-04-26 10:13:37 +03:00
Changed device_image_interface::load() to take 'const std::string &'
This commit is contained in:
parent
871656c98c
commit
764371c72c
@ -1018,7 +1018,7 @@ bool device_image_interface::schedule_postload_hard_reset_if_needed()
|
||||
// load - load an image into MAME
|
||||
//-------------------------------------------------
|
||||
|
||||
image_init_result device_image_interface::load(const char *path)
|
||||
image_init_result device_image_interface::load(const std::string &path)
|
||||
{
|
||||
return load_internal(path, false, 0, nullptr, false);
|
||||
}
|
||||
|
@ -228,7 +228,7 @@ public:
|
||||
const formatlist_type &formatlist() const { return m_formatlist; }
|
||||
|
||||
// loads an image file
|
||||
image_init_result load(const char *path);
|
||||
image_init_result load(const std::string &path);
|
||||
|
||||
// loads a softlist item by name
|
||||
image_init_result load_software(const std::string &softlist_name);
|
||||
|
@ -58,7 +58,7 @@ image_manager::image_manager(running_machine &machine)
|
||||
// try to load this image
|
||||
image_init_result result = is_softlist_part
|
||||
? image.load_software(image_name)
|
||||
: image.load(image_name.c_str());
|
||||
: image.load(image_name);
|
||||
|
||||
// did the image load fail?
|
||||
if (result != image_init_result::PASS)
|
||||
|
@ -49,7 +49,7 @@ void menu_control_floppy_image::do_load_create()
|
||||
}
|
||||
fd->setup_write(output_format);
|
||||
} else {
|
||||
image_init_result err = fd->load(input_filename.c_str());
|
||||
image_init_result err = fd->load(input_filename);
|
||||
if ((err == image_init_result::PASS) && (output_filename.compare("") != 0))
|
||||
err = fd->reopen_for_write(output_filename.c_str()) ? image_init_result::FAIL : image_init_result::PASS;
|
||||
if (err != image_init_result::PASS) {
|
||||
@ -61,7 +61,7 @@ void menu_control_floppy_image::do_load_create()
|
||||
}
|
||||
}
|
||||
|
||||
void menu_control_floppy_image::hook_load(std::string filename, bool softlist)
|
||||
void menu_control_floppy_image::hook_load(const std::string &filename, bool softlist)
|
||||
{
|
||||
if (softlist)
|
||||
{
|
||||
|
@ -33,7 +33,7 @@ private:
|
||||
virtual void handle() override;
|
||||
|
||||
void do_load_create();
|
||||
virtual void hook_load(std::string filename, bool softlist) override;
|
||||
virtual void hook_load(const std::string &filename, bool softlist) override;
|
||||
};
|
||||
|
||||
} // namespace ui
|
||||
|
@ -153,10 +153,10 @@ void menu_control_device_image::load_software_part()
|
||||
// hook_load
|
||||
//-------------------------------------------------
|
||||
|
||||
void menu_control_device_image::hook_load(std::string name, bool softlist)
|
||||
void menu_control_device_image::hook_load(const std::string &name, bool softlist)
|
||||
{
|
||||
if (m_image.is_reset_on_load()) m_image.set_init_phase();
|
||||
m_image.load(name.c_str());
|
||||
m_image.load(name);
|
||||
stack_pop();
|
||||
}
|
||||
|
||||
|
@ -53,7 +53,7 @@ protected:
|
||||
bool m_create_ok;
|
||||
|
||||
// methods
|
||||
virtual void hook_load(std::string filename, bool softlist);
|
||||
virtual void hook_load(const std::string &filename, bool softlist);
|
||||
virtual void handle() override;
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user