diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2016-01-10 16:36:18 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2016-01-10 16:36:18 -0500 |
commit | 115db95642ad6d861aad63775b92350e0491f2dd (patch) | |
tree | 8e7538ca804610335bff1927dc3b4d974b4c06da /src/devices/bus/gba/gba_slot.cpp | |
parent | 2a2a4a3c6e255c479d5072d02c2a40949f611ea6 (diff) |
Return std::string objects by value rather than pass by reference
- strprintf is unaltered, but strformat now takes one fewer argument
- state_string_export still fills a buffer, but has been made const
- get_default_card_software now takes no arguments but returns a string
Diffstat (limited to 'src/devices/bus/gba/gba_slot.cpp')
-rw-r--r-- | src/devices/bus/gba/gba_slot.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/devices/bus/gba/gba_slot.cpp b/src/devices/bus/gba/gba_slot.cpp index 82ef6663a93..1fa9372faa4 100644 --- a/src/devices/bus/gba/gba_slot.cpp +++ b/src/devices/bus/gba/gba_slot.cpp @@ -400,7 +400,7 @@ int gba_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len) get default card software -------------------------------------------------*/ -void gba_cart_slot_device::get_default_card_software(std::string &result) +std::string gba_cart_slot_device::get_default_card_software() { if (open_image_file(mconfig().options())) { @@ -417,11 +417,10 @@ void gba_cart_slot_device::get_default_card_software(std::string &result) //printf("type: %s\n", slot_string); clear(); - result.assign(slot_string); - return; + return std::string(slot_string); } - software_get_default_slot(result, "gba_rom"); + return software_get_default_slot("gba_rom"); } /*------------------------------------------------- |