Commit 55e0fb24 authored by Mukund Sivaraman's avatar Mukund Sivaraman

[master] Rename RRTTL::MAX() to MAX_TTL() to avoid shadowing

OpenBSD, NetBSD and some builds on MacOS don't like it.
parent 7454de81
......@@ -208,7 +208,7 @@ private:
// RR and the lexer is positioned at the next line. It's just for
// calculating the accurate source line when callback is necessary.
void limitTTL(RRTTL& ttl, bool post_parsing) {
if (ttl > RRTTL::MAX()) {
if (ttl > RRTTL::MAX_TTL()) {
const size_t src_line = lexer_.getSourceLine() -
(post_parsing ? 1 : 0);
callbacks_.warning(lexer_.getSourceName(), src_line,
......
......@@ -293,7 +293,7 @@ public:
///
/// \note At the moment an RRTTL object can have a value larger than
/// this limit. We may revisit it in a future version.
static const RRTTL& MAX() {
static const RRTTL& MAX_TTL() {
static const RRTTL max_ttl(0x7fffffff);
return (max_ttl);
}
......
......@@ -266,7 +266,7 @@ TEST_F(RRTTLTest, gthan) {
}
TEST_F(RRTTLTest, maxTTL) {
EXPECT_EQ((1u << 31) - 1, RRTTL::MAX().getValue());
EXPECT_EQ((1u << 31) - 1, RRTTL::MAX_TTL().getValue());
}
// test operator<<. We simply confirm it appends the result of toText().
......
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