diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-05 23:55:29 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-25 12:48:36 (GMT) |
commit | 3c45471c2d4a0c08b88f10161d4b166a27165e31 (patch) | |
tree | efc088b125e099d080e638736b46b0bcf5e03851 /Source/cmMakefile.cxx | |
parent | 71e69fc93b9f1a0829d04b9e44107c92458efe20 (diff) | |
download | CMake-3c45471c2d4a0c08b88f10161d4b166a27165e31.zip CMake-3c45471c2d4a0c08b88f10161d4b166a27165e31.tar.gz CMake-3c45471c2d4a0c08b88f10161d4b166a27165e31.tar.bz2 |
cmPolicies: Enable RVO for internal method.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 36b42bd..cae7bbc 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -4770,6 +4770,7 @@ cmMakefile::GetPolicyStatus(cmPolicies::PolicyID id) const cmPolicies::PolicyStatus cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const { + cmPolicies::PolicyStatus status = cmPolicies::GetPolicyStatus(id); cmLocalGenerator* lg = this->LocalGenerator; while(lg) { @@ -4779,14 +4780,15 @@ cmMakefile::GetPolicyStatusInternal(cmPolicies::PolicyID id) const { if(psi->IsDefined(id)) { - return psi->Get(id); + status = psi->Get(id); + return status; } } lg = lg->GetParent(); } // The policy is not set. Use the default for this CMake version. - return cmPolicies::GetPolicyStatus(id); + return status; } //---------------------------------------------------------------------------- |