Fix shadowing warning.

This commit is contained in:
Olli Lupton 2021-11-05 16:42:35 +01:00
parent 0230d69084
commit c9de97ef1e
No known key found for this signature in database
GPG Key ID: 2886C101B2C08D0E

View File

@ -971,11 +971,11 @@ FMT_CONSTEXPR auto count_digits(UInt n) -> int {
return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1; return (FMT_BUILTIN_CLZ(static_cast<uint32_t>(n) | 1) ^ 31) / BITS + 1;
#endif #endif
// Lambda avoids unreachable code warnings from NVHPC. // Lambda avoids unreachable code warnings from NVHPC.
return [](UInt n) { return [](UInt m) {
int num_digits = 0; int num_digits = 0;
do { do {
++num_digits; ++num_digits;
} while ((n >>= BITS) != 0); } while ((m >>= BITS) != 0);
return num_digits; return num_digits;
}(n); }(n);
} }