From 5916645064bc3e513bf76a2fc61a2b6f1db9b98b Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 28 Aug 2013 18:06:27 +0200 Subject: [PATCH] Fix some indentation problems in cmPolicies. --- Source/cmPolicies.cxx | 64 +++++++++++++++++++++---------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index a823f0595..f9197e07f 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -27,11 +27,11 @@ public: cmPolicies::PolicyStatus status) { if (!idString || !shortDescription || ! longDescription) - { + { cmSystemTools::Error("Attempt to define a policy without " "all parameters being specified!"); return; - } + } this->ID = iD; this->IDString = idString; this->ShortDescription = shortDescription; @@ -61,29 +61,29 @@ public: unsigned int tweakV) { if (majorV < this->MajorVersionIntroduced) - { + { return true; - } + } if (majorV > this->MajorVersionIntroduced) - { + { return false; - } + } if (minorV < this->MinorVersionIntroduced) - { + { return true; - } + } if (minorV > this->MinorVersionIntroduced) - { + { return false; - } + } if (patchV < this->PatchVersionIntroduced) - { + { return true; - } + } if (patchV > this->PatchVersionIntroduced) - { + { return false; - } + } return (tweakV < this->TweakVersionIntroduced); } @@ -609,9 +609,9 @@ cmPolicies::~cmPolicies() std::map::iterator i = this->Policies.begin(); for (;i != this->Policies.end(); ++i) - { + { delete i->second; - } + } } void cmPolicies::DefinePolicy(cmPolicies::PolicyID iD, @@ -626,11 +626,11 @@ void cmPolicies::DefinePolicy(cmPolicies::PolicyID iD, { // a policy must be unique and can only be defined once if (this->Policies.find(iD) != this->Policies.end()) - { + { cmSystemTools::Error("Attempt to redefine a CMake policy for policy " "ID ", this->GetPolicyIDString(iD).c_str()); return; - } + } this->Policies[iD] = new cmPolicy(iD, idString, shortDescription, @@ -784,15 +784,15 @@ bool cmPolicies::GetPolicyDefault(cmMakefile* mf, std::string const& policy, bool cmPolicies::GetPolicyID(const char *id, cmPolicies::PolicyID &pid) { if (!id || strlen(id) < 1) - { + { return false; - } + } std::map::iterator pos = this->PolicyStringMap.find(id); if (pos == this->PolicyStringMap.end()) - { + { return false; - } + } pid = pos->second; return true; } @@ -802,9 +802,9 @@ std::string cmPolicies::GetPolicyIDString(cmPolicies::PolicyID pid) std::map::iterator pos = this->Policies.find(pid); if (pos == this->Policies.end()) - { + { return ""; - } + } return pos->second->IDString; } @@ -815,11 +815,11 @@ std::string cmPolicies::GetPolicyWarning(cmPolicies::PolicyID id) std::map::iterator pos = this->Policies.find(id); if (pos == this->Policies.end()) - { + { cmSystemTools::Error( "Request for warning text for undefined policy!"); return "Request for warning text for undefined policy!"; - } + } cmOStringStream msg; msg << @@ -839,11 +839,11 @@ std::string cmPolicies::GetRequiredPolicyError(cmPolicies::PolicyID id) std::map::iterator pos = this->Policies.find(id); if (pos == this->Policies.end()) - { + { cmSystemTools::Error( "Request for error text for undefined policy!"); return "Request for error text for undefined policy!"; - } + } cmOStringStream error; error << @@ -869,10 +869,10 @@ cmPolicies::GetPolicyStatus(cmPolicies::PolicyID id) std::map::iterator pos = this->Policies.find(id); if (pos == this->Policies.end()) - { + { // TODO is this right? return cmPolicies::WARN; - } + } return pos->second->Status; } @@ -883,7 +883,7 @@ void cmPolicies::GetDocumentation(std::vector& v) std::map::iterator i = this->Policies.begin(); for (;i != this->Policies.end(); ++i) - { + { cmOStringStream full; full << i->second->LongDescription; full << "\nThis policy was introduced in CMake version "; @@ -920,7 +920,7 @@ void cmPolicies::GetDocumentation(std::vector& v) i->second->ShortDescription.c_str(), full.str().c_str()); v.push_back(e); - } + } } //----------------------------------------------------------------------------