summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2010-11-23 20:53:35 (GMT)
committerBrad King <brad.king@kitware.com>2011-01-04 12:42:49 (GMT)
commit8e45c1128cd6546a87d7ee32ace91950016f5233 (patch)
tree1e8f5485b41167117e448ab0b54d33f776ea9858 /Source/cmPolicies.cxx
parentb541b1213ac4bf95a186d9fa753ba2566e598d06 (diff)
downloadCMake-8e45c1128cd6546a87d7ee32ace91950016f5233.zip
CMake-8e45c1128cd6546a87d7ee32ace91950016f5233.tar.gz
CMake-8e45c1128cd6546a87d7ee32ace91950016f5233.tar.bz2
Fix indentation in cmPolicies::ApplyPolicyVersion()
Alex
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx27
1 files changed, 13 insertions, 14 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index 3fe92de..d147a3b 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -495,9 +495,9 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile *mf,
std::string ver = "2.4.0";
if (version && strlen(version) > 0)
- {
+ {
ver = version;
- }
+ }
unsigned int majorVer = 2;
unsigned int minorVer = 0;
@@ -556,29 +556,28 @@ bool cmPolicies::ApplyPolicyVersion(cmMakefile *mf,
// now loop over all the policies and set them as appropriate
std::vector<cmPolicies::PolicyID> ancientPolicies;
- std::map<cmPolicies::PolicyID,cmPolicy *>::iterator i
- = this->Policies.begin();
- for (;i != this->Policies.end(); ++i)
- {
- if (i->second->IsPolicyNewerThan(majorVer,minorVer,patchVer,tweakVer))
+ for(std::map<cmPolicies::PolicyID,cmPolicy *>::iterator i
+ = this->Policies.begin(); i != this->Policies.end(); ++i)
{
- if(i->second->Status == cmPolicies::REQUIRED_ALWAYS)
+ if (i->second->IsPolicyNewerThan(majorVer,minorVer,patchVer,tweakVer))
{
+ if(i->second->Status == cmPolicies::REQUIRED_ALWAYS)
+ {
ancientPolicies.push_back(i->first);
- }
+ }
else if (!mf->SetPolicy(i->second->ID, cmPolicies::WARN))
- {
+ {
return false;
+ }
}
- }
else
- {
- if (!mf->SetPolicy(i->second->ID, cmPolicies::NEW))
{
+ if (!mf->SetPolicy(i->second->ID, cmPolicies::NEW))
+ {
return false;
+ }
}
}
- }
// Make sure the project does not use any ancient policies.
if(!ancientPolicies.empty())