cmPolicies: Enable RVO for internal method.
This commit is contained in:
parent
71e69fc93b
commit
3c45471c2d
|
@ -4770,6 +4770,7 @@ cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const
|
||||||
cmPolicies::PolicyStatus
|
cmPolicies::PolicyStatus
|
||||||
cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
|
cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
|
||||||
{
|
{
|
||||||
|
cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id);
|
||||||
cmLocalGenerator* lg = this->LocalGenerator;
|
cmLocalGenerator* lg = this->LocalGenerator;
|
||||||
while(lg)
|
while(lg)
|
||||||
{
|
{
|
||||||
|
@ -4779,14 +4780,15 @@ cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const
|
||||||
{
|
{
|
||||||
if(psi->IsDefined(id))
|
if(psi->IsDefined(id))
|
||||||
{
|
{
|
||||||
return psi->Get(id);
|
status = psi->Get(id);
|
||||||
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lg = lg->GetParent();
|
lg = lg->GetParent();
|
||||||
}
|
}
|
||||||
|
|
||||||
// The policy is not set. Use the default for this CMake version.
|
// The policy is not set. Use the default for this CMake version.
|
||||||
return cmPolicies::GetPolicyStatus(id);
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue