do potentially precision-losing conversions explicitly

This commit is contained in:
Konstantin Trushin
2016-03-13 14:07:39 +03:00
parent d454d21409
commit 305882489c
3 changed files with 7 additions and 7 deletions

View File

@@ -93,7 +93,7 @@ static void u32toa_naive(uint32_t value, char* buffer) {
char temp[10];
char *p = temp;
do {
*p++ = char(value % 10) + '0';
*p++ = static_cast<char>(char(value % 10) + '0');
value /= 10;
} while (value > 0);
@@ -117,7 +117,7 @@ static void u64toa_naive(uint64_t value, char* buffer) {
char temp[20];
char *p = temp;
do {
*p++ = char(value % 10) + '0';
*p++ = static_cast<char>(char(value % 10) + '0');
value /= 10;
} while (value > 0);