[ox/std] Fix some type implicit conversions in ox_itoa

(synced from f514b33b06)
This commit is contained in:
2023-07-16 13:53:28 -05:00
parent 9da5eff97f
commit fa9c39920d
+3 -3
View File
@@ -170,7 +170,7 @@ constexpr T ox_itoa(Integer v, T str) noexcept {
constexpr auto base = 10;
auto it = 0;
if (val < 0) {
str[it] = '-';
str[static_cast<std::size_t>(it)] = '-';
it++;
}
while (mod) {
@@ -183,11 +183,11 @@ constexpr T ox_itoa(Integer v, T str) noexcept {
start = 'a';
digit -= 10;
}
str[it] = static_cast<typename ox::remove_reference<decltype(str[0])>::type>(start + digit);
str[static_cast<std::size_t>(it)] = static_cast<typename ox::remove_reference<decltype(str[0])>::type>(start + digit);
it++;
}
}
str[it] = 0;
str[static_cast<std::size_t>(it)] = 0;
} else {
// 0 is a special case
str[0] = '0';