summaryrefslogtreecommitdiff
path: root/Source/cmXCode21Object.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmXCode21Object.cxx')
-rw-r--r--Source/cmXCode21Object.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmXCode21Object.cxx b/Source/cmXCode21Object.cxx
index a9bb2ef543..6b133a9e89 100644
--- a/Source/cmXCode21Object.cxx
+++ b/Source/cmXCode21Object.cxx
@@ -30,11 +30,12 @@ void cmXCode21Object::PrintComment(std::ostream& out)
out << " */";
}
-void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
- std::ostream& out, PBXType t)
+void cmXCode21Object::PrintList(
+ std::vector<std::unique_ptr<cmXCodeObject>> const& v, std::ostream& out,
+ PBXType t)
{
bool hasOne = false;
- for (auto obj : v) {
+ for (const auto& obj : v) {
if (obj->GetType() == OBJECT && obj->GetIsA() == t) {
hasOne = true;
break;
@@ -44,7 +45,7 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
return;
}
out << "\n/* Begin " << PBXTypeNames[t] << " section */\n";
- for (auto obj : v) {
+ for (const auto& obj : v) {
if (obj->GetType() == OBJECT && obj->GetIsA() == t) {
obj->Print(out);
}
@@ -52,8 +53,8 @@ void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
out << "/* End " << PBXTypeNames[t] << " section */\n";
}
-void cmXCode21Object::PrintList(std::vector<cmXCodeObject*> const& v,
- std::ostream& out)
+void cmXCode21Object::PrintList(
+ std::vector<std::unique_ptr<cmXCodeObject>> const& v, std::ostream& out)
{
cmXCodeObject::Indent(1, out);
out << "objects = {\n";