summaryrefslogtreecommitdiffstats
path: root/Source/cmXCode21Object.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/cmXCode21Object.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/cmXCode21Object.cxx')
-rw-r--r--Source/cmXCode21Object.cxx52
1 files changed, 21 insertions, 31 deletions
diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx
index b47e302..1abdf66 100644
--- a/Source/cmXCode21Object.cxx
+++ b/Source/cmXCode21Object.cxx
@@ -14,26 +14,23 @@
#include "cmSystemTools.h"
cmXCode21Object::cmXCode21Object(PBXType ptype, Type type)
- :cmXCodeObject(ptype, type)
+ : cmXCodeObject(ptype, type)
{
this->Version = 21;
}
void cmXCode21Object::PrintComment(std::ostream& out)
{
- if(this->Comment.empty())
- {
+ if (this->Comment.empty()) {
cmXCodeObject* n = this->GetObject("name");
- if(n)
- {
+ if (n) {
this->Comment = n->GetString();
cmSystemTools::ReplaceString(this->Comment, "\"", "");
- }
}
- if(this->Comment.empty())
- {
+ }
+ if (this->Comment.empty()) {
return;
- }
+ }
out << " /* ";
out << this->Comment;
out << " */";
@@ -43,31 +40,26 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
std::ostream& out, PBXType t)
{
bool hasOne = false;
- for(std::vector<cmXCodeObject*>::const_iterator i = v.begin();
- i != v.end(); ++i)
- {
+ for (std::vector<cmXCodeObject*>::const_iterator i = v.begin(); i != v.end();
+ ++i) {
cmXCodeObject* obj = *i;
- if(obj->GetType() == OBJECT && obj->GetIsA() == t)
- {
+ if (obj->GetType() == OBJECT && obj->GetIsA() == t) {
hasOne = true;
break;
- }
}
- if(!hasOne)
- {
+ }
+ if (!hasOne) {
return;
- }
- out << "\n/* Begin " << PBXTypeNames[t] << " section */\n";
- for(std::vector<cmXCodeObject*>::const_iterator i = v.begin();
- i != v.end(); ++i)
- {
+ }
+ out << "\n/* Begin " << PBXTypeNames[t] << " section */\n";
+ for (std::vector<cmXCodeObject*>::const_iterator i = v.begin(); i != v.end();
+ ++i) {
cmXCodeObject* obj = *i;
- if(obj->GetType() == OBJECT && obj->GetIsA() == t)
- {
- obj->Print(out);
- }
+ if (obj->GetType() == OBJECT && obj->GetIsA() == t) {
+ obj->Print(out);
}
- out << "/* End " << PBXTypeNames[t] << " section */\n";
+ }
+ out << "/* End " << PBXTypeNames[t] << " section */\n";
}
void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
@@ -80,8 +72,7 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXBuildStyle);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXContainerItemProxy);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFileReference);
- cmXCode21Object::PrintList(v, out,
- cmXCode21Object::PBXFrameworksBuildPhase);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXFrameworksBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXGroup);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXHeadersBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXNativeTarget);
@@ -91,8 +82,7 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXResourcesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXSourcesBuildPhase);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXCopyFilesBuildPhase);
- cmXCode21Object::PrintList(v, out,
- cmXCode21Object::PBXApplicationReference);
+ cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXApplicationReference);
cmXCode21Object::PrintList(v, out,
cmXCode21Object::PBXExecutableFileReference);
cmXCode21Object::PrintList(v, out, cmXCode21Object::PBXLibraryReference);