From 5e7d459eeca7bc53deab0ee9634601386b53d7c0 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Thu, 23 Aug 2018 10:41:14 -0700 Subject: Export of internal Abseil changes. -- 2dcf3ec79f961d2962cdad33ac4bfbcb14126dad by Abseil Team : Consolidate implementations of CountLeadingZeros and add new ones for CountTrailingZeros. Internal APIs only. PiperOrigin-RevId: 209961247 -- 4f3ac87c6928dab26faff962bb18aade9383f184 by Jorg Brown : Fix absl::CUnescape not to write to const_cast(str->data()), which does the wrong thing if the string type is copy-on-write PiperOrigin-RevId: 209957656 -- c5103067be19dc88a4c32e5306154e5e3bba4673 by Tom Manshreck : Update comments in time library header files. PiperOrigin-RevId: 209829588 -- fe36f9b6150243d2ac88e2a892d84c565c18cd2f by Abseil Team : Clarifying the sample use of absl::LoadTimeZone function in the documentation. PiperOrigin-RevId: 209782218 GitOrigin-RevId: 2dcf3ec79f961d2962cdad33ac4bfbcb14126dad Change-Id: I3e2f87a8c543599b81eada58409a9bddc0b51ab8 --- absl/strings/numbers.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'absl/strings/numbers.cc') 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 #include +#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 Mul32(std::pair 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 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); -- cgit v1.2.3