summaryrefslogtreecommitdiffstats
path: root/Source/cmInstalledFile.cxx
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 14:34:04 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-16 20:05:19 (GMT)
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Source/cmInstalledFile.cxx
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadCMake-d9fd2f5402eeaa345691313658e02b51038f570b.zip
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
CMake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.bz2
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
Diffstat (limited to 'Source/cmInstalledFile.cxx')
-rw-r--r--Source/cmInstalledFile.cxx39
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);