diff options
author | npwoods <npwoods@mess.org> | 2022-09-14 13:02:30 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 03:02:30 +1000 |
commit | 3737b424d6c8ef4fb3ea393e9407361a7e095d94 (patch) | |
tree | 732c524436f789780bec41c832e33e2cc99ac3ef /src/osd/modules | |
parent | 81e5abf05222ce96c70ea29e9ffed3922afcc811 (diff) |
util/corestr.cpp: Changed core_stricmp to take std::string_view parameters. (#10287)
Note that the implementation is still not UTF-8 aware.
Diffstat (limited to 'src/osd/modules')
-rw-r--r-- | src/osd/modules/font/font_sdl.cpp | 4 | ||||
-rw-r--r-- | src/osd/modules/font/font_windows.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/osd/modules/font/font_sdl.cpp b/src/osd/modules/font/font_sdl.cpp index 6c97f0a71f0..ee3024177d4 100644 --- a/src/osd/modules/font/font_sdl.cpp +++ b/src/osd/modules/font/font_sdl.cpp @@ -351,10 +351,10 @@ bool font_sdl::get_font_families(std::string const &font_path, std::vector<std:: { auto const compare_fonts = [](std::pair<std::string, std::string> const &a, std::pair<std::string, std::string> const &b) -> bool { - int const second = core_stricmp(a.second.c_str(), b.second.c_str()); + int const second = core_stricmp(a.second, b.second); if (second < 0) return true; else if (second > 0) return false; - else return core_stricmp(b.first.c_str(), b.first.c_str()) < 0; + else return core_stricmp(b.first, b.first) < 0; }; std::string config((const char *)val.u.s); std::string display(config); diff --git a/src/osd/modules/font/font_windows.cpp b/src/osd/modules/font/font_windows.cpp index 8e0bd568349..b11ffe75111 100644 --- a/src/osd/modules/font/font_windows.cpp +++ b/src/osd/modules/font/font_windows.cpp @@ -109,7 +109,7 @@ bool osd_font_windows::open(std::string const &font_path, std::string const &_na // if it doesn't match our request, fail std::string utf = osd::text::from_tstring(&realname[0]); - int result = core_stricmp(utf.c_str(), name.c_str()); + int result = core_stricmp(utf, name); // if we didn't match, nuke our font and fall back if (result != 0) |