1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 17:02:37 +01:00

Codechange: Replace strcasestr with StrContainsIgnoreCase.

This commit is contained in:
frosch
2025-04-04 21:42:45 +02:00
committed by frosch
parent 14bab7d76b
commit 9229956f04
4 changed files with 7 additions and 32 deletions

View File

@@ -2205,7 +2205,7 @@ DEF_CONSOLE_CMD(ConContent)
if (StrEqualsIgnoreCase(argv[1], "state")) {
IConsolePrint(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.c_str(), argv[2]) == nullptr) continue;
if (argc > 2 && !StrContainsIgnoreCase((*iter)->name, argv[2])) continue;
OutputContentState(*iter);
}
return true;