summaryrefslogtreecommitdiff
path: root/absl/strings/numbers.h
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-06-13 02:25:41 -0700
committerGravatar Copybara-Service <copybara-worker@google.com>2023-06-13 02:26:26 -0700
commit8a1b239cce0cb1997f9f1a896ed27d87cd4d8434 (patch)
tree5d9e40567472e238122f92f65d92bfda2203bdc1 /absl/strings/numbers.h
parent77111e3d5b40df6019fedc85198f7376c120bffb (diff)
Remove two_ASCII_digits and replace with a scalar algorithm
PiperOrigin-RevId: 539900072 Change-Id: I675386e3184f6f5ab70b851add970c91d1dde9c5
Diffstat (limited to 'absl/strings/numbers.h')
-rw-r--r--absl/strings/numbers.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/absl/strings/numbers.h b/absl/strings/numbers.h
index 86c84ed3..d7630cef 100644
--- a/absl/strings/numbers.h
+++ b/absl/strings/numbers.h
@@ -125,8 +125,6 @@ namespace numbers_internal {
ABSL_DLL extern const char kHexChar[17]; // 0123456789abcdef
ABSL_DLL extern const char
kHexTable[513]; // 000102030405060708090a0b0c0d0e0f1011...
-ABSL_DLL extern const char
- two_ASCII_digits[100][2]; // 00, 01, 02, 03...
// Writes a two-character representation of 'i' to 'buf'. 'i' must be in the
// range 0 <= i < 100, and buf must have space for two characters. Example:
@@ -134,10 +132,7 @@ ABSL_DLL extern const char
// PutTwoDigits(42, buf);
// // buf[0] == '4'
// // buf[1] == '2'
-inline void PutTwoDigits(size_t i, char* buf) {
- assert(i < 100);
- memcpy(buf, two_ASCII_digits[i], 2);
-}
+void PutTwoDigits(uint32_t i, char* buf);
// safe_strto?() functions for implementing SimpleAtoi()