Skip to content

Commit 01280e3

Browse files
derekmauronetkex
authored andcommitted
Remove deprecated symbol absl::kuint128max
absl::kuint128max should be replaced with absl::Uint128Max() PiperOrigin-RevId: 606279299 Change-Id: Ib67b5431f14891f56bb706e62f183d0de75d335f
1 parent 53c875c commit 01280e3

File tree

5 files changed

+4
-14
lines changed

5 files changed

+4
-14
lines changed

absl/numeric/int128.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
namespace absl {
3030
ABSL_NAMESPACE_BEGIN
3131

32-
ABSL_DLL const uint128 kuint128max = MakeUint128(
33-
std::numeric_limits<uint64_t>::max(), std::numeric_limits<uint64_t>::max());
34-
3532
namespace {
3633

3734
// Returns the 0-based position of the last set bit (i.e., most significant bit)

absl/numeric/int128.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,6 @@ class
244244
#endif // byte order
245245
};
246246

247-
// Prefer to use the constexpr `Uint128Max()`.
248-
//
249-
// TODO(absl-team) deprecate kuint128max once migration tool is released.
250-
ABSL_DLL extern const uint128 kuint128max;
251-
252247
// allow uint128 to be logged
253248
std::ostream& operator<<(std::ostream& os, uint128 v);
254249

absl/numeric/int128_stream_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ TEST(Uint128, OStreamValueTest) {
135135
"2000000000000000000000000000000000000000000"});
136136
CheckUint128Case({absl::MakeUint128(0x8000000000000000, 0), kHex,
137137
/*width = */ 0, "80000000000000000000000000000000"});
138-
CheckUint128Case({absl::kuint128max, kDec, /*width = */ 0,
138+
CheckUint128Case({absl::Uint128Max(), kDec, /*width = */ 0,
139139
"340282366920938463463374607431768211455"});
140-
CheckUint128Case({absl::kuint128max, kOct, /*width = */ 0,
140+
CheckUint128Case({absl::Uint128Max(), kOct, /*width = */ 0,
141141
"3777777777777777777777777777777777777777777"});
142-
CheckUint128Case({absl::kuint128max, kHex, /*width = */ 0,
142+
CheckUint128Case({absl::Uint128Max(), kHex, /*width = */ 0,
143143
"ffffffffffffffffffffffffffffffff"});
144144
}
145145

absl/numeric/int128_test.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ TEST(Uint128, AllTests) {
231231
EXPECT_EQ(two, -((-one) - 1));
232232
EXPECT_EQ(absl::Uint128Max(), -one);
233233
EXPECT_EQ(zero, -zero);
234-
235-
EXPECT_EQ(absl::Uint128Max(), absl::kuint128max);
236234
}
237235

238236
TEST(Int128, RightShiftOfNegativeNumbers) {

absl/time/duration.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ struct SafeMultiply {
219219
? static_cast<uint128>(Uint128Low64(a) * Uint128Low64(b))
220220
: a * b;
221221
}
222-
return b == 0 ? b : (a > kuint128max / b) ? kuint128max : a * b;
222+
return b == 0 ? b : (a > Uint128Max() / b) ? Uint128Max() : a * b;
223223
}
224224
};
225225

0 commit comments

Comments
 (0)