Fix CI: cast the 128-bit unsigned value explicitly in the integer fast path

The up-to-16-digit fast path from develop assigned number_unsigned_t to
std::uint64_t implicitly, which -Wconversion rejects for __int128.

Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
Niels Lohmann committed 2026-10-15 19:39:04 +02:00
1 parent df33a3a8f7
commit 9d2891fae6
2 files changed
+2 -2

No files matched your search

@@ -1430,7 +1430,7 @@ class serializer
// without leading zeros
if (abs_value < 10000000000000000u)
{
const std::uint64_t value = abs_value;
const auto value = static_cast<std::uint64_t>(abs_value); // fits: abs_value < 10^16
const std::uint64_t upper = value / 100000000u;
const std::uint64_t first = dtoa_impl::eight_digit_bytes(upper != 0 ? upper : value);
const auto leading = static_cast<unsigned>(count_leading_zeros(first) / 8); // (first is not 0)
+1 -1
View File
@@ -28951,7 +28951,7 @@ class serializer
// without leading zeros
if (abs_value < 10000000000000000u)
{
const std::uint64_t value = abs_value;
const auto value = static_cast<std::uint64_t>(abs_value); // fits: abs_value < 10^16
const std::uint64_t upper = value / 100000000u;
const std::uint64_t first = dtoa_impl::eight_digit_bytes(upper != 0 ? upper : value);
const auto leading = static_cast<unsigned>(count_leading_zeros(first) / 8); // (first is not 0)