summaryrefslogtreecommitdiff
path: root/Source/cmXCode21Object.cxx
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 10:34:04 -0400
committerBrad King <brad.king@kitware.com>2016-05-16 16:05:19 -0400
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Source/cmXCode21Object.cxx
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadcmake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
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 b47e302624..1abdf663e1 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);