OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "tools/gn/xcode_writer.h" | 5 #include "tools/gn/xcode_writer.h" |
6 | 6 |
7 #include <iomanip> | 7 #include <iomanip> |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <sstream> | 10 #include <sstream> |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 << "\tobjectVersion = 46;\n" | 412 << "\tobjectVersion = 46;\n" |
413 << "\tobjects = {\n"; | 413 << "\tobjects = {\n"; |
414 | 414 |
415 for (auto& pair : CollectPBXObjectsPerClass(project)) { | 415 for (auto& pair : CollectPBXObjectsPerClass(project)) { |
416 out << "\n" | 416 out << "\n" |
417 << "/* Begin " << ToString(pair.first) << " section */\n"; | 417 << "/* Begin " << ToString(pair.first) << " section */\n"; |
418 std::sort(pair.second.begin(), pair.second.end(), | 418 std::sort(pair.second.begin(), pair.second.end(), |
419 [](const PBXObject* a, const PBXObject* b) { | 419 [](const PBXObject* a, const PBXObject* b) { |
420 return a->id() < b->id(); | 420 return a->id() < b->id(); |
421 }); | 421 }); |
422 for (const auto& object : pair.second) { | 422 for (auto* object : pair.second) { |
423 object->Print(out, 2); | 423 object->Print(out, 2); |
424 } | 424 } |
425 out << "/* End " << ToString(pair.first) << " section */\n"; | 425 out << "/* End " << ToString(pair.first) << " section */\n"; |
426 } | 426 } |
427 | 427 |
428 out << "\t};\n" | 428 out << "\t};\n" |
429 << "\trootObject = " << project->Reference() << ";\n" | 429 << "\trootObject = " << project->Reference() << ";\n" |
430 << "}\n"; | 430 << "}\n"; |
431 } | 431 } |
OLD | NEW |