summaryrefslogtreecommitdiffstats
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-08-28 16:06:27 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-08-28 16:06:27 (GMT)
commit5916645064bc3e513bf76a2fc61a2b6f1db9b98b (patch)
treeb3d4c75c4387ab8fac939add6d9076f146ec0345 /Source/cmPolicies.cxx
parentb6f6802b3d0dc1a9ab7beb62a17bd0651d87a64f (diff)
downloadCMake-5916645064bc3e513bf76a2fc61a2b6f1db9b98b.zip
CMake-5916645064bc3e513bf76a2fc61a2b6f1db9b98b.tar.gz
CMake-5916645064bc3e513bf76a2fc61a2b6f1db9b98b.tar.bz2
Fix some indentation problems in cmPolicies.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx64
1 files changed, 32 insertions, 32 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index a823f05..f9197e0 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<cmPolicies::PolicyID,cmPolicy *>::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<std::string,cmPolicies::PolicyID>::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<cmPolicies::PolicyID,cmPolicy *>::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<cmPolicies::PolicyID,cmPolicy *>::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<cmPolicies::PolicyID,cmPolicy *>::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<cmPolicies::PolicyID,cmPolicy *>::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<cmDocumentationEntry>& v)
std::map<cmPolicies::PolicyID,cmPolicy *>::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<cmDocumentationEntry>& v)
i->second->ShortDescription.c_str(),
full.str().c_str());
v.push_back(e);
- }
+ }
}
//----------------------------------------------------------------------------