summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/win/consolewininfo.cpp
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2016-10-01 14:53:32 -0400
committer Nathan Woods <npwoods@mess.org>2016-10-01 14:53:32 -0400
commitc0ff37c30da931bd1ea203aba1e8dc8a05ea1bf1 (patch)
tree97265a831a19f4ef76e049886a5771033d25edcc /src/osd/modules/debugger/win/consolewininfo.cpp
parent0e2299e424d7da177a57bb530ae740c79a3c92a0 (diff)
Adding new string conversion overloads
[a|w|t|utf8]_from_[a|w|t|utf8_]string(xyz.c_str()) seems to be common enough to justify overloads. Also, I'm explicitly assuming that it is legal to override the NUL pointer within a C++ basic_string (e.g. - s[s.size()] = '\0'). As far as I can tell, this seems to be legal - please don't shoot if I am wrong.
Diffstat (limited to 'src/osd/modules/debugger/win/consolewininfo.cpp')
-rw-r--r--src/osd/modules/debugger/win/consolewininfo.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/osd/modules/debugger/win/consolewininfo.cpp b/src/osd/modules/debugger/win/consolewininfo.cpp
index 5ba21d46167..98ad966f14c 100644
--- a/src/osd/modules/debugger/win/consolewininfo.cpp
+++ b/src/osd/modules/debugger/win/consolewininfo.cpp
@@ -43,7 +43,7 @@ consolewin_info::consolewin_info(debugger_windows_interface &debugger) :
m_devices_menu = CreatePopupMenu();
for (device_image_interface &img : iter)
{
- auto tc_buf = tstring_from_utf8(string_format("%s : %s", img.device().name(), img.exists() ? img.filename() : "[no image]").c_str());
+ tstring tc_buf = tstring_from_utf8(string_format("%s : %s", img.device().name(), img.exists() ? img.filename() : "[no image]"));
AppendMenu(m_devices_menu, MF_ENABLED, 0, tc_buf.c_str());
}
AppendMenu(GetMenu(window()), MF_ENABLED | MF_POPUP, (UINT_PTR)m_devices_menu, TEXT("Images"));
@@ -189,7 +189,7 @@ void consolewin_info::update_menu()
AppendMenu(devicesubmenu, flags_for_exists, new_item + DEVOPTION_CASSETTE_FASTFORWARD, TEXT("Fast Forward"));
}
- auto tc_buf = tstring_from_utf8(string_format("%s :%s", img.device().name(), img.exists() ? img.filename() : "[empty slot]").c_str());
+ tstring tc_buf = tstring_from_utf8(string_format("%s :%s", img.device().name(), img.exists() ? img.filename() : "[empty slot]"));
ModifyMenu(m_devices_menu, cnt, MF_BYPOSITION | MF_POPUP, (UINT_PTR)devicesubmenu, tc_buf.c_str());
cnt++;
@@ -214,7 +214,7 @@ bool consolewin_info::handle_command(WPARAM wparam, LPARAM lparam)
std::string filter;
build_generic_filter(img, false, filter);
{
- auto t_filter = tstring_from_utf8(filter.c_str());
+ tstring t_filter = tstring_from_utf8(filter);
// convert a pipe-char delimited string into a NUL delimited string
for (int i = 0; t_filter[i] != '\0'; i++)
@@ -252,7 +252,7 @@ bool consolewin_info::handle_command(WPARAM wparam, LPARAM lparam)
std::string filter;
build_generic_filter(img, true, filter);
{
- auto t_filter = tstring_from_utf8(filter.c_str());
+ tstring t_filter = tstring_from_utf8(filter);
// convert a pipe-char delimited string into a NUL delimited string
for (int i = 0; t_filter[i] != '\0'; i++)
{