diff options
author | 2020-12-08 21:19:17 -0500 | |
---|---|---|
committer | 2020-12-08 21:24:46 -0500 | |
commit | c22cb17f326b4939d8ff4219410909e32e70ab86 (patch) | |
tree | 8db68c201fa9673eeb6acab37a5d221c7a338ea6 /src/emu/rendfont.h | |
parent | 6172111b187c1dd66329adb2b9bba2a82a0ce116 (diff) |
C++17 string handling updates (without charconv so as not to break GCC 7)
- render.cpp, rendlay.cpp, ui/ui.cpp, ui/menu.cpp: Change argument types for text processing functions from const char * to std::string_view
- ui/menu.cpp: Add overloads of item_append omitting the frequently empty subtext argument
- cheat.cpp: Remove some c_str() calls that became unnecessary a while ago
Diffstat (limited to 'src/emu/rendfont.h')
-rw-r--r-- | src/emu/rendfont.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/emu/rendfont.h b/src/emu/rendfont.h index fc0c4853733..f4ceb78bf09 100644 --- a/src/emu/rendfont.h +++ b/src/emu/rendfont.h @@ -37,8 +37,8 @@ public: // size queries s32 pixel_height() const { return m_height; } float char_width(float height, float aspect, char32_t ch); - float string_width(float height, float aspect, const char *string); - float utf8string_width(float height, float aspect, const char *utf8string); + float string_width(float height, float aspect, std::string_view string); + float utf8string_width(float height, float aspect, std::string_view utf8string); // texture/bitmap queries render_texture *get_char_texture_and_bounds(float height, float aspect, char32_t ch, render_bounds &bounds); |