summaryrefslogtreecommitdiffstats
path: root/src/frontend/mame/ui/filesel.cpp
diff options
context:
space:
mode:
author Nathan Woods <npwoods@mess.org>2017-01-05 07:36:29 -0500
committer Nathan Woods <npwoods@mess.org>2017-01-05 07:36:29 -0500
commit97d88693a73e134d3107108aed535fa5b5f393ab (patch)
treef341f4d92c1b76bda7f4088a15ce4f92a51e39e0 /src/frontend/mame/ui/filesel.cpp
parentea87606550db588f1a1a126382e9e0e818d3b804 (diff)
Changed filesel.cpp to use wstring_from_utf8()
Diffstat (limited to 'src/frontend/mame/ui/filesel.cpp')
-rw-r--r--src/frontend/mame/ui/filesel.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/frontend/mame/ui/filesel.cpp b/src/frontend/mame/ui/filesel.cpp
index 6bd84863db7..256834c5de1 100644
--- a/src/frontend/mame/ui/filesel.cpp
+++ b/src/frontend/mame/ui/filesel.cpp
@@ -23,7 +23,6 @@
#include <cstring>
#include <locale>
-#include <codecvt>
namespace ui {
/***************************************************************************
@@ -359,12 +358,11 @@ void menu_file_selector::populate(float &customtop, float &custombottom)
}
// sort the menu entries
- std::wstring_convert<std::codecvt_utf8<wchar_t>> conv;
const std::collate<wchar_t>& coll = std::use_facet<std::collate<wchar_t>>(std::locale());
- std::sort(m_entrylist.begin()+first, m_entrylist.end(), [&coll, &conv](file_selector_entry const &x, file_selector_entry const &y)
+ std::sort(m_entrylist.begin()+first, m_entrylist.end(), [&coll](file_selector_entry const &x, file_selector_entry const &y)
{
- std::wstring xstr = conv.from_bytes(x.basename);
- std::wstring ystr = conv.from_bytes(y.basename);
+ std::wstring xstr = wstring_from_utf8(x.basename);
+ std::wstring ystr = wstring_from_utf8(y.basename);
return coll.compare(xstr.data(), xstr.data()+xstr.size(), ystr.data(), ystr.data()+ystr.size()) < 0;
} );