From 8a1b239cce0cb1997f9f1a896ed27d87cd4d8434 Mon Sep 17 00:00:00 2001 From: Abseil Team Date: Tue, 13 Jun 2023 02:25:41 -0700 Subject: Remove two_ASCII_digits and replace with a scalar algorithm PiperOrigin-RevId: 539900072 Change-Id: I675386e3184f6f5ab70b851add970c91d1dde9c5 --- absl/strings/numbers.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'absl/strings/numbers.h') 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() -- cgit v1.2.3