1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 10:22:39 +01:00

Codechange: make SetDebugString use C++-style strings and function types

This commit is contained in:
Rubidium
2025-04-24 23:50:59 +02:00
committed by rubidium42
parent 498a0f1c1b
commit 86039a5b69
5 changed files with 37 additions and 41 deletions

View File

@@ -1838,7 +1838,7 @@ static bool ConDebugLevel([[maybe_unused]] uint8_t argc, [[maybe_unused]] char *
if (argc == 1) {
IConsolePrint(CC_DEFAULT, "Current debug-level: '{}'", GetDebugString());
} else {
SetDebugString(argv[1], [](const std::string &err) { IConsolePrint(CC_ERROR, err); });
SetDebugString(argv[1], [](std::string_view err) { IConsolePrint(CC_ERROR, "{}", err); });
}
return true;