diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-30 13:02:44 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-06-10 20:09:44 +0200 |
commit | e3717ae903cb770ae2ebc4abe45fa0cc77326409 (patch) | |
tree | 2a9b087c8fce31b51de3a7fe987be622323f963e /src/console_cmds.cpp | |
parent | df181bb641a75e9fae557c683b790cfba961ec5a (diff) | |
download | openttd-e3717ae903cb770ae2ebc4abe45fa0cc77326409.tar.xz |
Codechange: [ContentInfo] Use std::string instead of string buffers
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index 3c5ca5d24..7a756a657 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -1812,7 +1812,7 @@ static void OutputContentState(const ContentInfo *const ci) char buf[sizeof(ci->md5sum) * 2 + 1]; md5sumToString(buf, lastof(buf), ci->md5sum); - IConsolePrintF(state_to_colour[ci->state], "%d, %s, %s, %s, %08X, %s", ci->id, types[ci->type - 1], states[ci->state], ci->name, ci->unique_id, buf); + IConsolePrintF(state_to_colour[ci->state], "%d, %s, %s, %s, %08X, %s", ci->id, types[ci->type - 1], states[ci->state], ci->name.c_str(), ci->unique_id, buf); } DEF_CONSOLE_CMD(ConContent) @@ -1882,7 +1882,7 @@ DEF_CONSOLE_CMD(ConContent) if (strcasecmp(argv[1], "state") == 0) { IConsolePrintF(CC_WHITE, "id, type, state, name"); for (ConstContentIterator iter = _network_content_client.Begin(); iter != _network_content_client.End(); iter++) { - if (argc > 2 && strcasestr((*iter)->name, argv[2]) == nullptr) continue; + if (argc > 2 && strcasestr((*iter)->name.c_str(), argv[2]) == nullptr) continue; OutputContentState(*iter); } return true; |