Commit 87f149c4 authored by jamesge's avatar jamesge

fix a narrowing warning on aarch64

parent 2f8fc37d
Pipeline #397 failed with stages
......@@ -19,7 +19,7 @@
namespace butil {
static const char g_tolower_map_base[] = {
static const signed char g_tolower_map_base[] = {
-128, -127, -126, -125, -124, -123, -122, -121, -120,
-119, -118, -117, -116, -115, -114, -113, -112, -111, -110,
-109, -108, -107, -106, -105, -104, -103, -102, -101, -100,
......@@ -48,6 +48,6 @@ static const char g_tolower_map_base[] = {
120, 121, 122, 123, 124, 125, 126, 127
};
extern const char* const g_tolower_map = g_tolower_map_base + 128;
extern const signed char* const g_tolower_map = g_tolower_map_base + 128;
} // namespace butil
......@@ -27,7 +27,7 @@ namespace butil {
// NOTE: Using ascii_tolower instead of ::tolower shortens 150ns in
// FlatMapTest.perf_small_string_map (with -O2 added, -O0 by default)
inline char ascii_tolower(char c) {
extern const char* const g_tolower_map;
extern const signed char* const g_tolower_map;
return g_tolower_map[(int)c];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment