diff options
author | Abseil Team <absl-team@google.com> | 2021-05-06 20:08:01 -0700 |
---|---|---|
committer | Andy Getz <durandal@google.com> | 2021-05-07 13:51:04 -0400 |
commit | 079cf662544a14bd1cfaae6d6512645541ba10fb (patch) | |
tree | 99d164c0162508aa69ace6879d9a36f89e145065 /absl/strings/charconv.cc | |
parent | 70b29fe5a5c1752158830eabc9aa273718b477af (diff) |
Export of internal Abseil changes
--
51e9291d9bc385082b4061fe760b236ba59c79c3 by Abseil Team <absl-team@google.com>:
Cast to uint64_t using braces instead of parentheses.
PiperOrigin-RevId: 372475909
--
939fc409855da2639dcaf2d1d4971ca0e0568d03 by Martijn Vels <mvels@google.com>:
Expand # flat nodes into size detailed counters.
PiperOrigin-RevId: 372474608
--
54b158c99b32f8a14821ce74fed0f9f836525ce7 by Martijn Vels <mvels@google.com>:
Make copies of sampled cords sampled as well
This applies to the following methods:
- Cord(const Cord&)
- operator=(const Cord&)
- Subcord(...)
PiperOrigin-RevId: 372468160
--
876c2581ce008871464e8b471efbb967d150f83b by Andy Getzendanner <durandal@google.com>:
Document the type of an ABSL_FLAGS.OnUpdate() callback.
PiperOrigin-RevId: 372406390
GitOrigin-RevId: 51e9291d9bc385082b4061fe760b236ba59c79c3
Change-Id: Ifb75122cae56b66c28128aee90a63bbb28d93817
Diffstat (limited to 'absl/strings/charconv.cc')
-rw-r--r-- | absl/strings/charconv.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/absl/strings/charconv.cc b/absl/strings/charconv.cc index b8674c28..fefcfc90 100644 --- a/absl/strings/charconv.cc +++ b/absl/strings/charconv.cc @@ -111,7 +111,7 @@ struct FloatTraits<double> { return sign ? -ldexp(mantissa, exponent) : ldexp(mantissa, exponent); #else constexpr uint64_t kMantissaMask = - (uint64_t(1) << (kTargetMantissaBits - 1)) - 1; + (uint64_t{1} << (kTargetMantissaBits - 1)) - 1; uint64_t dbl = static_cast<uint64_t>(sign) << 63; if (mantissa > kMantissaMask) { // Normal value. @@ -151,7 +151,7 @@ struct FloatTraits<float> { return sign ? -ldexpf(mantissa, exponent) : ldexpf(mantissa, exponent); #else constexpr uint32_t kMantissaMask = - (uint32_t(1) << (kTargetMantissaBits - 1)) - 1; + (uint32_t{1} << (kTargetMantissaBits - 1)) - 1; uint32_t flt = static_cast<uint32_t>(sign) << 31; if (mantissa > kMantissaMask) { // Normal value. @@ -499,7 +499,7 @@ bool MustRoundUp(uint64_t guess_mantissa, int guess_exponent, template <typename FloatType> CalculatedFloat CalculatedFloatFromRawValues(uint64_t mantissa, int exponent) { CalculatedFloat result; - if (mantissa == uint64_t(1) << FloatTraits<FloatType>::kTargetMantissaBits) { + if (mantissa == uint64_t{1} << FloatTraits<FloatType>::kTargetMantissaBits) { mantissa >>= 1; exponent += 1; } |