Skip to content

Commit

Permalink
Rename leading_v -> leading_xdigit
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
  • Loading branch information
phprus authored and vitaut committed Nov 25, 2022
1 parent 649aa10 commit 91c024e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -3147,9 +3147,9 @@ FMT_CONSTEXPR20 void format_hexfloat(Float value, int precision,

constexpr auto leading_shift = ((num_xdigits - 1) * 4);
const auto leading_mask = carrier_uint(0xF) << leading_shift;
const auto leading_v =
const auto leading_xdigit =
static_cast<uint32_t>((f.f & leading_mask) >> leading_shift);
if (leading_v > 1) f.e -= (32 - FMT_BUILTIN_CLZ(leading_v) - 1);
if (leading_xdigit > 1) f.e -= (32 - FMT_BUILTIN_CLZ(leading_xdigit) - 1);

int print_xdigits = num_xdigits - 1;
if (precision >= 0 && print_xdigits > precision) {
Expand Down

0 comments on commit 91c024e

Please sign in to comment.