mirror of
https://github.com/nlohmann/json.git
synced 2026-04-07 16:48:56 +00:00
🚨 fix warning
This commit is contained in:
@@ -241,8 +241,8 @@ boundaries compute_boundaries(FloatType value)
|
||||
const bool lower_boundary_is_closer = F == 0 && E > 1;
|
||||
const diyfp m_plus = diyfp((2 * v.f) + 1, v.e - 1);
|
||||
const diyfp m_minus = lower_boundary_is_closer
|
||||
? diyfp(4 * v.f - 1, v.e - 2) // (B)
|
||||
: diyfp(2 * v.f - 1, v.e - 1); // (A)
|
||||
? diyfp((4 * v.f) - 1, v.e - 2) // (B)
|
||||
: diyfp((2 * v.f) - 1, v.e - 1); // (A)
|
||||
|
||||
// Determine the normalized w+ = m+.
|
||||
const diyfp w_plus = diyfp::normalize(m_plus);
|
||||
@@ -472,7 +472,7 @@ inline cached_power get_cached_power_for_binary_exponent(int e)
|
||||
JSON_ASSERT(e >= -1500);
|
||||
JSON_ASSERT(e <= 1500);
|
||||
const int f = kAlpha - e - 1;
|
||||
const int k = (f * 78913) / (1 << 18) + static_cast<int>(f > 0);
|
||||
const int k = ((f * 78913) / (1 << 18)) + static_cast<int>(f > 0);
|
||||
|
||||
const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / kCachedPowersDecStep;
|
||||
JSON_ASSERT(index >= 0);
|
||||
@@ -950,15 +950,15 @@ inline char* append_exponent(char* buf, int e)
|
||||
}
|
||||
else if (k < 100)
|
||||
{
|
||||
*buf++ = static_cast<char>('0' + k / 10);
|
||||
*buf++ = static_cast<char>('0' + (k / 10));
|
||||
k %= 10;
|
||||
*buf++ = static_cast<char>('0' + k);
|
||||
}
|
||||
else
|
||||
{
|
||||
*buf++ = static_cast<char>('0' + k / 100);
|
||||
*buf++ = static_cast<char>('0' + (k / 100));
|
||||
k %= 100;
|
||||
*buf++ = static_cast<char>('0' + k / 10);
|
||||
*buf++ = static_cast<char>('0' + (k / 10));
|
||||
k %= 10;
|
||||
*buf++ = static_cast<char>('0' + k);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user