cmPolicies: Implement more-compact IsPolicyNewerThan.
This commit is contained in:
parent
a7ff972751
commit
fdca04db68
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue