mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 19:54:06 +01:00
Codechange: pass the characters to trim to StrTrimView
This commit is contained in:
@@ -96,7 +96,7 @@ static const std::initializer_list<KeycodeNames> _keycode_to_name = {
|
||||
*/
|
||||
static std::optional<uint16_t> ParseCode(std::string_view keystr)
|
||||
{
|
||||
keystr = StrTrimView(keystr);
|
||||
keystr = StrTrimView(keystr, StringConsumer::WHITESPACE_NO_NEWLINE);
|
||||
for (const auto &kn : _keycode_to_name) {
|
||||
if (StrEqualsIgnoreCase(keystr, kn.name)) {
|
||||
return kn.keycode;
|
||||
|
||||
Reference in New Issue
Block a user