[ox/std] Fix some type implicit conversions in ox_itoa
This commit is contained in:
parent
6e94c2be8d
commit
f514b33b06
6
deps/ox/src/ox/std/strops.hpp
vendored
6
deps/ox/src/ox/std/strops.hpp
vendored
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user