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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user