From 3c15e0c889bdc11832f3322977be4844349e97c5 Mon Sep 17 00:00:00 2001 From: Rubidium Date: Mon, 31 Mar 2025 20:34:57 +0200 Subject: [PATCH] Codefix: return right type to prevent casting --- src/strgen/strgen_base.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/strgen/strgen_base.cpp b/src/strgen/strgen_base.cpp index 8e94acb91c..1bce628ac3 100644 --- a/src/strgen/strgen_base.cpp +++ b/src/strgen/strgen_base.cpp @@ -403,9 +403,9 @@ static const CmdStruct *FindCmd(std::string_view s) return nullptr; } -static uint ResolveCaseName(std::string_view str) +static uint8_t ResolveCaseName(std::string_view str) { - uint case_idx = _lang.GetCaseIndex(str); + uint8_t case_idx = _lang.GetCaseIndex(str); if (case_idx >= MAX_NUM_CASES) StrgenFatal("Invalid case-name '{}'", str); return case_idx + 1; }