Skip to content

Commit

Permalink
Max: Change to MaxValue
Browse files Browse the repository at this point in the history
Some codebases still feature macroses
such as Max(), which clash with
gtrst-internal.h's Max() function.
This change proposes that we name
it as MaxValue().
  • Loading branch information
serkazi committed Jan 3, 2023
1 parent 71140c3 commit ce4272f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions googletest/include/gtest/internal/gtest-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ class FloatingPoint {
static RawType Infinity() { return ReinterpretBits(kExponentBitMask); }

// Returns the maximum representable finite floating-point number.
static RawType Max();
static RawType MaxValue();

// Non-static methods

Expand Down Expand Up @@ -392,11 +392,11 @@ class FloatingPoint {
// We cannot use std::numeric_limits<T>::max() as it clashes with the max()
// macro defined by <windows.h>.
template <>
inline float FloatingPoint<float>::Max() {
inline float FloatingPoint<float>::MaxValue() {
return FLT_MAX;
}
template <>
inline double FloatingPoint<double>::Max() {
inline double FloatingPoint<double>::MaxValue() {
return DBL_MAX;
}

Expand Down

0 comments on commit ce4272f

Please sign in to comment.