Replace some uses of "LL" and "ULL" suffixes.
Change-Id: I468093c77b5a22d3f858353092b86efa80170046
Reviewed-on: https://code-review.googlesource.com/c/re2/+/55230
Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/re2/bitmap256.h b/re2/bitmap256.h
index 54c3bf3..4899379 100644
--- a/re2/bitmap256.h
+++ b/re2/bitmap256.h
@@ -32,7 +32,7 @@
DCHECK_GE(c, 0);
DCHECK_LE(c, 255);
- return (words_[c / 64] & (1ULL << (c % 64))) != 0;
+ return (words_[c / 64] & (uint64_t{1} << (c % 64))) != 0;
}
// Sets the bit with index c.
@@ -40,7 +40,7 @@
DCHECK_GE(c, 0);
DCHECK_LE(c, 255);
- words_[c / 64] |= (1ULL << (c % 64));
+ words_[c / 64] |= (uint64_t{1} << (c % 64));
}
// Finds the next non-zero bit with index >= c.
@@ -88,7 +88,7 @@
// Check the word that contains the bit. Mask out any lower bits.
int i = c / 64;
- uint64_t word = words_[i] & (~0ULL << (c % 64));
+ uint64_t word = words_[i] & (~uint64_t{0} << (c % 64));
if (word != 0)
return (i * 64) + FindLSBSet(word);
diff --git a/re2/testing/regexp_benchmark.cc b/re2/testing/regexp_benchmark.cc
index c53ade0..d85784f 100644
--- a/re2/testing/regexp_benchmark.cc
+++ b/re2/testing/regexp_benchmark.cc
@@ -944,7 +944,7 @@
bool expect_match) {
Regexp* re = Regexp::Parse(regexp, Regexp::LikePerl, NULL);
CHECK(re);
- Prog* prog = re->CompileToProg(1LL<<31);
+ Prog* prog = re->CompileToProg(int64_t{1}<<31);
CHECK(prog);
for (auto _ : state) {
bool failed = false;