1
0
mirror of https://github.com/nlohmann/json.git synced 2026-07-21 19:23:03 +04:00

🚨 fix compiler warnings #2049

This commit is contained in:
Niels Lohmann
2020-04-19 13:01:36 +02:00
parent be137609df
commit 4fb0795ec1
4 changed files with 7 additions and 9 deletions
@@ -1006,7 +1006,7 @@ inline char* format_buffer(char* buf, int len, int decimal_exponent,
std::memmove(buf + (static_cast<size_t>(n) + 1), buf + n, static_cast<size_t>(k) - static_cast<size_t>(n));
buf[n] = '.';
return buf + (static_cast<size_t>(k) + 1);
return buf + (static_cast<size_t>(k) + 1U);
}
if (min_exp < n and n <= 0)
@@ -1018,7 +1018,7 @@ inline char* format_buffer(char* buf, int len, int decimal_exponent,
buf[0] = '0';
buf[1] = '.';
std::memset(buf + 2, '0', static_cast<size_t>(-n));
return buf + (2 + static_cast<size_t>(-n) + k);
return buf + (2U + static_cast<size_t>(-n) + static_cast<size_t>(k));
}
if (k == 1)