diff options
Diffstat (limited to 'Source/cmInstalledFile.cxx')
-rw-r--r-- | Source/cmInstalledFile.cxx | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/Source/cmInstalledFile.cxx b/Source/cmInstalledFile.cxx index 3dac750..ed0f74b 100644 --- a/Source/cmInstalledFile.cxx +++ b/Source/cmInstalledFile.cxx @@ -15,23 +15,20 @@ #include "cmMakefile.h" #include "cmSystemTools.h" -cmInstalledFile::cmInstalledFile(): - NameExpression(0) +cmInstalledFile::cmInstalledFile() + : NameExpression(0) { - } cmInstalledFile::~cmInstalledFile() { - if(NameExpression) - { + if (NameExpression) { delete NameExpression; - } + } } cmInstalledFile::Property::Property() { - } cmInstalledFile::Property::~Property() @@ -64,14 +61,15 @@ void cmInstalledFile::RemoveProperty(const std::string& prop) } void cmInstalledFile::SetProperty(cmMakefile const* mf, - const std::string& prop, const char* value) + const std::string& prop, const char* value) { this->RemoveProperty(prop); this->AppendProperty(mf, prop, value); } void cmInstalledFile::AppendProperty(cmMakefile const* mf, - const std::string& prop, const char* value, bool /*asString*/) + const std::string& prop, + const char* value, bool /*asString*/) { cmListFileBacktrace backtrace = mf->GetBacktrace(); cmGeneratorExpression ge(backtrace); @@ -80,34 +78,31 @@ void cmInstalledFile::AppendProperty(cmMakefile const* mf, property.ValueExpressions.push_back(ge.Parse(value).release()); } -bool cmInstalledFile::HasProperty( - const std::string& prop) const +bool cmInstalledFile::HasProperty(const std::string& prop) const { return this->Properties.find(prop) != this->Properties.end(); } -bool cmInstalledFile::GetProperty( - const std::string& prop, std::string& value) const +bool cmInstalledFile::GetProperty(const std::string& prop, + std::string& value) const { PropertyMapType::const_iterator i = this->Properties.find(prop); - if(i == this->Properties.end()) - { + if (i == this->Properties.end()) { return false; - } + } Property const& property = i->second; std::string output; std::string separator; - for(ExpressionVectorType::const_iterator - j = property.ValueExpressions.begin(); - j != property.ValueExpressions.end(); ++j) - { + for (ExpressionVectorType::const_iterator j = + property.ValueExpressions.begin(); + j != property.ValueExpressions.end(); ++j) { output += separator; output += (*j)->GetInput(); separator = ";"; - } + } value = output; return true; @@ -121,7 +116,7 @@ bool cmInstalledFile::GetPropertyAsBool(const std::string& prop) const } void cmInstalledFile::GetPropertyAsList(const std::string& prop, - std::vector<std::string>& list) const + std::vector<std::string>& list) const { std::string value; this->GetProperty(prop, value); |