QTypeRevision: Fix warnings about max macro from windows.h

Similar to def272750c, put parentheses
around std::numeric_limits<Integer>::max, fixing:

qversionnumber.h(339): warning C4003: not enough arguments for function-like macro invocation 'max'

Change-Id: Id574f3a08973cf1408e015f155c8e658b04bd170
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Friedemann Kleint 2020-03-04 15:42:39 +01:00
parent 649d7abcd2
commit 09f3272814

View File

@ -335,8 +335,9 @@ public:
template<typename Integer, if_valid_segment_type<Integer> = true>
static constexpr bool isValidSegment(Integer segment)
{
// using extra parentheses around max to avoid expanding it if it is a macro
return segment >= Integer(0)
&& (std::numeric_limits<Integer>::max() < Integer(SegmentUnknown)
&& ((std::numeric_limits<Integer>::max)() < Integer(SegmentUnknown)
|| segment < Integer(SegmentUnknown));
}