diff options
author | Abseil Team <absl-team@google.com> | 2018-08-23 10:41:14 -0700 |
---|---|---|
committer | Derek Mauro <dmauro@google.com> | 2018-08-23 13:48:48 -0400 |
commit | 5e7d459eeca7bc53deab0ee9634601386b53d7c0 (patch) | |
tree | d4f394901eaf492da175e6ae92c195235a0fc9ab /absl/strings/numbers.cc | |
parent | bed5bd6e185c7e0311f3a1f2dab4c96083dac636 (diff) | |
download | abseil-5e7d459eeca7bc53deab0ee9634601386b53d7c0.tar.gz abseil-5e7d459eeca7bc53deab0ee9634601386b53d7c0.tar.bz2 abseil-5e7d459eeca7bc53deab0ee9634601386b53d7c0.zip |
Export of internal Abseil changes.
--
2dcf3ec79f961d2962cdad33ac4bfbcb14126dad by Abseil Team <absl-team@google.com>:
Consolidate implementations of CountLeadingZeros and add new ones for
CountTrailingZeros.
Internal APIs only.
PiperOrigin-RevId: 209961247
--
4f3ac87c6928dab26faff962bb18aade9383f184 by Jorg Brown <jorg@google.com>:
Fix absl::CUnescape not to write to const_cast<char*>(str->data()), which does the wrong thing if the string type is copy-on-write
PiperOrigin-RevId: 209957656
--
c5103067be19dc88a4c32e5306154e5e3bba4673 by Tom Manshreck <shreck@google.com>:
Update comments in time library header files.
PiperOrigin-RevId: 209829588
--
fe36f9b6150243d2ac88e2a892d84c565c18cd2f by Abseil Team <absl-team@google.com>:
Clarifying the sample use of absl::LoadTimeZone function in the documentation.
PiperOrigin-RevId: 209782218
GitOrigin-RevId: 2dcf3ec79f961d2962cdad33ac4bfbcb14126dad
Change-Id: I3e2f87a8c543599b81eada58409a9bddc0b51ab8
Diffstat (limited to 'absl/strings/numbers.cc')
-rw-r--r-- | absl/strings/numbers.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/absl/strings/numbers.cc b/absl/strings/numbers.cc index cc878f5b..9309f9da 100644 --- a/absl/strings/numbers.cc +++ b/absl/strings/numbers.cc @@ -30,10 +30,10 @@ #include <memory> #include <utility> +#include "absl/base/internal/bits.h" #include "absl/base/internal/raw_logging.h" #include "absl/strings/ascii.h" #include "absl/strings/charconv.h" -#include "absl/strings/internal/bits.h" #include "absl/strings/internal/memutil.h" #include "absl/strings/str_cat.h" @@ -344,7 +344,7 @@ static std::pair<uint64_t, uint64_t> Mul32(std::pair<uint64_t, uint64_t> num, uint64_t bits128_up = (bits96_127 >> 32) + (bits64_127 < bits64_95); if (bits128_up == 0) return {bits64_127, bits0_63}; - int shift = 64 - strings_internal::CountLeadingZeros64(bits128_up); + int shift = 64 - base_internal::CountLeadingZeros64(bits128_up); uint64_t lo = (bits0_63 >> shift) + (bits64_127 << (64 - shift)); uint64_t hi = (bits64_127 >> shift) + (bits128_up << (64 - shift)); return {hi, lo}; @@ -375,7 +375,7 @@ static std::pair<uint64_t, uint64_t> PowFive(uint64_t num, int expfive) { 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5, 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5 * 5}; result = Mul32(result, powers_of_five[expfive & 15]); - int shift = strings_internal::CountLeadingZeros64(result.first); + int shift = base_internal::CountLeadingZeros64(result.first); if (shift != 0) { result.first = (result.first << shift) + (result.second >> (64 - shift)); result.second = (result.second << shift); |