summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/ui/cmdrender.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/emu/ui/cmdrender.h')
-rw-r--r--src/emu/ui/cmdrender.h21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/emu/ui/cmdrender.h b/src/emu/ui/cmdrender.h
index b8d0eb1571b..130fed0a272 100644
--- a/src/emu/ui/cmdrender.h
+++ b/src/emu/ui/cmdrender.h
@@ -4,7 +4,7 @@
ui/cmdrender.h
- UI rendfont.
+ UI command render fonts.
***************************************************************************/
@@ -14,7 +14,6 @@
void convert_command_glyph(std::string &str)
{
int j;
- const char *s = str.c_str();
int len = str.length();
int buflen = (len + 2) * 2;
char *d = global_alloc_array(char, buflen);
@@ -23,16 +22,16 @@ void convert_command_glyph(std::string &str)
{
fix_command_t *fixcmd = nullptr;
unicode_char uchar;
- int ucharcount = uchar_from_utf8(&uchar, s + i, len - i);
+ int ucharcount = uchar_from_utf8(&uchar, str.substr(i).c_str(), len - i);
if (ucharcount == -1)
break;
else if (ucharcount != 1)
goto process_next;
- else if (s[i] == '\n')
+ else if (str[i] == '\n')
uchar = '\n';
- else if (s[i] == COMMAND_CONVERT_TEXT)
+ else if (str[i] == COMMAND_CONVERT_TEXT)
{
- if (s[i] == s[i + 1])
+ if (str[i] == str[i + 1])
++i;
else
{
@@ -42,7 +41,7 @@ void convert_command_glyph(std::string &str)
if (!fixtext->glyph_str_len)
fixtext->glyph_str_len = strlen(fixtext->glyph_str);
- if (strncmp(fixtext->glyph_str, s + i + 1, fixtext->glyph_str_len) == 0)
+ if (strncmp(fixtext->glyph_str, str.substr(i + 1).c_str(), fixtext->glyph_str_len) == 0)
{
uchar = fixtext->glyph_code + COMMAND_UNICODE;
i += strlen(fixtext->glyph_str);
@@ -51,19 +50,19 @@ void convert_command_glyph(std::string &str)
}
}
}
- else if (s[i] == COMMAND_DEFAULT_TEXT)
+ else if (str[i] == COMMAND_DEFAULT_TEXT)
fixcmd = default_text;
- else if (s[i] == COMMAND_EXPAND_TEXT)
+ else if (str[i] == COMMAND_EXPAND_TEXT)
fixcmd = expand_text;
if (fixcmd)
{
- if (s[i] == s[i + 1])
+ if (str[i] == str[i + 1])
i++;
else
{
for (; fixcmd->glyph_code; ++fixcmd)
- if (s[i + 1] == fixcmd->glyph_char)
+ if (str[i + 1] == fixcmd->glyph_char)
{
uchar = fixcmd->glyph_code + COMMAND_UNICODE;
++i;