diff --git a/include/stdex/string.hpp b/include/stdex/string.hpp index 4e930aba8..5440db6a8 100644 --- a/include/stdex/string.hpp +++ b/include/stdex/string.hpp @@ -1181,9 +1181,8 @@ namespace stdex { stdex_assert(str1); stdex_assert(str2); - size_t i; unsigned int a, b; - for (i = 0; ; ++i) { + for (size_t i = 0; ; ++i) { a = static_cast(tolower(str1[i])); b = static_cast(tolower(str2[i])); if (!a && !b) return 0; @@ -1206,11 +1205,10 @@ namespace stdex { stdex_assert(str1); stdex_assert(str2); - size_t i; unsigned int a, b; const auto& ctype1 = std::use_facet>(locale); const auto& ctype2 = std::use_facet>(locale); - for (i = 0;; ++i) { + for (size_t i = 0;; ++i) { a = static_cast(ctype1.tolower(str1[i])); b = static_cast(ctype2.tolower(str2[i])); if (!a && !b) return 0;