1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 01:12:39 +01:00

Codechange: use const for std::string_view where appropriate

This commit is contained in:
Rubidium
2025-04-29 07:10:48 +02:00
committed by rubidium42
parent 78250c3bba
commit af25eecc15
34 changed files with 87 additions and 87 deletions

View File

@@ -684,7 +684,7 @@ static bool ConClearBuffer(std::span<std::string_view> argv)
* Network Core Console Commands
**********************************/
static bool ConKickOrBan(std::string_view arg, bool ban, const std::string_view reason)
static bool ConKickOrBan(std::string_view arg, bool ban, std::string_view reason)
{
uint n;
@@ -1241,7 +1241,7 @@ static bool ConSchedule(std::span<std::string_view> argv)
}
/* We only support a single script scheduled, so we tell the user what's happening if there was already one. */
const std::string_view filename = std::string_view(argv[2]);
std::string_view filename = std::string_view(argv[2]);
if (!_scheduled_monthly_script.empty() && filename == _scheduled_monthly_script) {
IConsolePrint(CC_INFO, "Script file '{}' was already scheduled to execute at the start of next calendar month.", filename);
} else if (!_scheduled_monthly_script.empty() && filename != _scheduled_monthly_script) {