mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Remove CStr::Left
It was only a wrapper around `std::string::substr`. In some places it's better to use `std::string::starts_with`.
This commit is contained in:
@@ -109,7 +109,7 @@ SDL_Scancode FindScancode(const CStr8& keyname)
|
||||
return code;
|
||||
|
||||
// Parse SYM_XX codes, see below.
|
||||
if (keyname.size() > 4 && keyname.Left(4) == "SYM_")
|
||||
if (keyname.size() > 4 && keyname.starts_with("SYM_"))
|
||||
return static_cast<SDL_Scancode>(CStr(keyname.substr(4)).ToInt());
|
||||
|
||||
return SDL_SCANCODE_UNKNOWN;
|
||||
|
||||
Reference in New Issue
Block a user