1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-25 05:04:07 +01:00

Codechange: Pass std::string_view from drivers instead of char *.

This commit is contained in:
Peter Nelson
2024-04-09 02:47:14 +01:00
committed by Peter Nelson
parent a42aa1a086
commit 332cbca36e
52 changed files with 161 additions and 161 deletions

View File

@@ -576,7 +576,7 @@ bool VideoDriver_SDL::PollEvent()
return true;
}
const char *VideoDriver_SDL::Start(const StringList &param)
std::optional<std::string_view> VideoDriver_SDL::Start(const StringList &param)
{
char buf[30];
_use_hwpalette = GetDriverParamInt(param, "hw_palette", 2);
@@ -607,7 +607,7 @@ const char *VideoDriver_SDL::Start(const StringList &param)
this->is_game_threaded = !GetDriverParamBool(param, "no_threads") && !GetDriverParamBool(param, "no_thread");
return nullptr;
return std::nullopt;
}
void VideoDriver_SDL::SetupKeyboard()