summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 7688c59..3402191 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -86,9 +86,10 @@ static bool isPolicyNewerThan(cmPolicies::PolicyID id, unsigned int majorV,
switch (id) {
#define POLICY_CASE(ID, V_MAJOR, V_MINOR, V_PATCH) \
case cmPolicies::ID: \
- return ( \
- majorV < V_MAJOR || (majorV == V_MAJOR && minorV + 1 < V_MINOR + 1) || \
- (majorV == V_MAJOR && minorV == V_MINOR && patchV + 1 < V_PATCH + 1));
+ return (majorV < (V_MAJOR) || \
+ (majorV == (V_MAJOR) && minorV + 1 < (V_MINOR) + 1) || \
+ (majorV == (V_MAJOR) && minorV == (V_MINOR) && \
+ patchV + 1 < (V_PATCH) + 1));
CM_FOR_EACH_POLICY_ID_VERSION(POLICY_CASE)
#undef POLICY_CASE
case cmPolicies::CMPCOUNT: