diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2020-12-08 21:19:17 -0500 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2020-12-08 21:24:46 -0500 |
commit | c22cb17f326b4939d8ff4219410909e32e70ab86 (patch) | |
tree | 8db68c201fa9673eeb6acab37a5d221c7a338ea6 /src/emu/render.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/render.h')
-rw-r--r-- | src/emu/render.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/emu/render.h b/src/emu/render.h index a94a23a0c97..3b945a08b8c 100644 --- a/src/emu/render.h +++ b/src/emu/render.h @@ -56,6 +56,7 @@ #include <memory> #include <mutex> #include <string> +#include <string_view> #include <tuple> #include <unordered_map> #include <utility> @@ -591,7 +592,7 @@ private: virtual void draw_aligned(running_machine &machine, bitmap_argb32 &dest, const rectangle &bounds, int state); // drawing helpers - void draw_text(render_font &font, bitmap_argb32 &dest, const rectangle &bounds, const char *str, int align, const render_color &color); + void draw_text(render_font &font, bitmap_argb32 &dest, const rectangle &bounds, std::string_view str, int align, const render_color &color); void draw_segment_horizontal_caps(bitmap_argb32 &dest, int minx, int maxx, int midy, int width, int caps, rgb_t color); void draw_segment_horizontal(bitmap_argb32 &dest, int minx, int maxx, int midy, int width, rgb_t color); void draw_segment_vertical_caps(bitmap_argb32 &dest, int miny, int maxy, int midx, int width, int caps, rgb_t color); |