diff --git a/api/utf16.hpp b/api/utf16.hpp index 9f0100865..de3e5907d 100644 --- a/api/utf16.hpp +++ b/api/utf16.hpp @@ -56,7 +56,7 @@ namespace jule { std::vector a(s.size()); jule::Int n = 0; - for (jule::Int i = 0; i < s.size(); ++i) + for (decltype(s.size()) i = 0; i < s.size(); ++i) { jule::U16 r = s[i]; if (r < jule::UTF16_SURR1 || jule::UTF16_SURR3 <= r) @@ -84,7 +84,7 @@ namespace jule { std::vector runes; const char *str = s.c_str(); - for (jule::Int index = 0; index < s.length();) + for (decltype(s.length()) index = 0; index < s.length();) { jule::I32 rune; jule::Int n; @@ -100,7 +100,7 @@ namespace jule const std::size_t len) { std::vector code_page(len); - for (jule::Int i = 0; i < len; ++i) + for (std::size_t i = 0; i < len; ++i) code_page[i] = static_cast(wstr[i]); return jule::runes_to_utf8(jule::utf16_decode(code_page)); }