summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmPolicies.cxx23
1 files changed, 6 insertions, 17 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 6a15965..9250620 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -80,23 +80,12 @@ public:
unsigned int minorV,
unsigned int patchV)
{
- if (majorV < this->MajorVersionIntroduced)
- {
- return true;
- }
- if (majorV > this->MajorVersionIntroduced)
- {
- return false;
- }
- if (minorV < this->MinorVersionIntroduced)
- {
- return true;
- }
- if (minorV > this->MinorVersionIntroduced)
- {
- return false;
- }
- return (patchV < this->PatchVersionIntroduced);
+ return (majorV < this->MajorVersionIntroduced ||
+ (majorV == this->MajorVersionIntroduced &&
+ minorV < this->MinorVersionIntroduced) ||
+ (majorV == this->MajorVersionIntroduced &&
+ minorV == this->MinorVersionIntroduced &&
+ patchV < this->PatchVersionIntroduced));
}
cmPolicies::PolicyID ID;