summaryrefslogtreecommitdiff
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-05 22:09:49 +0200
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-05 22:09:49 +0200
commit1a9de8035c35cdb3e0501ce2cf2f816e4220bea0 (patch)
tree8d2e7686145b5e03ddb5a0e181f9bb1b78dd47c7 /Source/cmPolicies.cxx
parentbfdf1322e7638687c96b323b1df20fd9c08b3044 (diff)
downloadcmake-1a9de8035c35cdb3e0501ce2cf2f816e4220bea0.tar.gz
surround macro arguments with parentheses
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 7688c59945..340219161d 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: