OpenBSD, NetBSD and some builds on MacOS don't like it.
// 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,
///
/// \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);
}
}
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().