diff --git a/src/common/rectangle.h b/src/common/rectangle.h index bb2fa4dff..c7369e57e 100644 --- a/src/common/rectangle.h +++ b/src/common/rectangle.h @@ -10,11 +10,8 @@ namespace Common { template struct Rectangle { - enum : T - { - InvalidMinCoord = std::numeric_limits::max(), - InvalidMaxCoord = std::numeric_limits::min() - }; + static constexpr T InvalidMinCoord = std::numeric_limits::max(); + static constexpr T InvalidMaxCoord = std::numeric_limits::min(); /// Default constructor - initializes to an invalid coordinate range suitable for including points. constexpr Rectangle() : left(InvalidMinCoord), top(InvalidMinCoord), right(InvalidMaxCoord), bottom(InvalidMaxCoord)