]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Remove redundant cast in floating_from_chars.cc
authorJonathan Wakely <jwakely@redhat.com>
Thu, 20 Feb 2025 15:16:11 +0000 (15:16 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Sat, 22 Feb 2025 21:20:18 +0000 (21:20 +0000)
In r15-7647-g32457bc25fea80 I added a cast and also changed the type of
the variable, making the cast redundant. This removes the cast.

libstdc++-v3/ChangeLog:

* src/c++17/floating_from_chars.cc (__floating_from_chars_hex):
Remove redundant cast.

libstdc++-v3/src/c++17/floating_from_chars.cc

index d48f1c0d45453e5ddda333ed6b3de454f7689c64..9bad12c7f69ecd5ce1275e05484d3e96dd492867 100644 (file)
@@ -1103,8 +1103,7 @@ namespace
        // If the leading hexit is not '1', shift MANTISSA to make it so.
        // This normalizes input like "4.08p0" into "1.02p2".
        const unsigned leading_hexit = mantissa >> mantissa_bits;
-       const int leading_hexit_width
-         = __bit_width((unsigned)leading_hexit); // FIXME: optimize?
+       const int leading_hexit_width = __bit_width(leading_hexit); // FIXME: optimize?
        __glibcxx_assert(leading_hexit_width >= 1 && leading_hexit_width <= 4);
        shift_mantissa(leading_hexit_width - 1);
        // After this adjustment, we can assume the leading hexit is '1'.