summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-05 20:09:49 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-09-05 20:09:49 (GMT)
commit1a9de8035c35cdb3e0501ce2cf2f816e4220bea0 (patch)
tree8d2e7686145b5e03ddb5a0e181f9bb1b78dd47c7 /Source/cmPolicies.cxx
parentbfdf1322e7638687c96b323b1df20fd9c08b3044 (diff)
downloadCMake-1a9de8035c35cdb3e0501ce2cf2f816e4220bea0.zip
CMake-1a9de8035c35cdb3e0501ce2cf2f816e4220bea0.tar.gz
CMake-1a9de8035c35cdb3e0501ce2cf2f816e4220bea0.tar.bz2
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 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: