summaryrefslogtreecommitdiffstats
path: root/Source/cmXCodeScheme.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-09-29 12:47:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-09-29 12:48:16 (GMT)
commite24e0ff6fac02bc8a12514d22ab4d8b80d789f56 (patch)
treee48f4134d4d5f1f685626713d1fa41bf8a8496fb /Source/cmXCodeScheme.cxx
parentf920ffd8f382c891bd863977eb453533b39c4bcc (diff)
parent77f674be35717a6eb296246733885b5a7ddf95ec (diff)
downloadCMake-e24e0ff6fac02bc8a12514d22ab4d8b80d789f56.zip
CMake-e24e0ff6fac02bc8a12514d22ab4d8b80d789f56.tar.gz
CMake-e24e0ff6fac02bc8a12514d22ab4d8b80d789f56.tar.bz2
Merge topic 'clang-tidy'
77f674be Fix some occurrences of readability-braces-around-statements f0bab294 Convert some leftover loops to C++11 range-based loop b5d7f5b0 Fix occurrences of readability-non-const-parameter 9a2da339 Fix some occurrences of readability-avoid-const-params-in-decls 870dd06d Fix left-over occurrences of else-after-return 2033abff Fix minor clang-tidy findings 79b8c380 Improve several occurrences of vector::push_back in loops a45928cd Fix some occurrences of missing override keywords ... Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1292
Diffstat (limited to 'Source/cmXCodeScheme.cxx')
-rw-r--r--Source/cmXCodeScheme.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx
index bca39af..f1dce64 100644
--- a/Source/cmXCodeScheme.cxx
+++ b/Source/cmXCodeScheme.cxx
@@ -91,7 +91,7 @@ void cmXCodeScheme::WriteBuildAction(cmXMLWriter& xout,
}
void cmXCodeScheme::WriteTestAction(cmXMLWriter& xout,
- std::string configuration,
+ const std::string& configuration,
const std::string& container)
{
xout.StartElement("TestAction");
@@ -104,12 +104,11 @@ void cmXCodeScheme::WriteTestAction(cmXMLWriter& xout,
xout.Attribute("shouldUseLaunchSchemeArgsEnv", "YES");
xout.StartElement("Testables");
- for (TestObjects::const_iterator it = this->Tests.begin();
- it != this->Tests.end(); ++it) {
+ for (auto test : this->Tests) {
xout.StartElement("TestableReference");
xout.BreakAttributes();
xout.Attribute("skipped", "NO");
- WriteBuildableReference(xout, *it, container);
+ WriteBuildableReference(xout, test, container);
xout.EndElement(); // TestableReference
}
xout.EndElement();
@@ -127,7 +126,7 @@ void cmXCodeScheme::WriteTestAction(cmXMLWriter& xout,
}
void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout,
- std::string configuration,
+ const std::string& configuration,
const std::string& container)
{
xout.StartElement("LaunchAction");
@@ -164,7 +163,7 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout,
}
void cmXCodeScheme::WriteProfileAction(cmXMLWriter& xout,
- std::string configuration)
+ const std::string& configuration)
{
xout.StartElement("ProfileAction");
xout.BreakAttributes();
@@ -177,7 +176,7 @@ void cmXCodeScheme::WriteProfileAction(cmXMLWriter& xout,
}
void cmXCodeScheme::WriteAnalyzeAction(cmXMLWriter& xout,
- std::string configuration)
+ const std::string& configuration)
{
xout.StartElement("AnalyzeAction");
xout.BreakAttributes();
@@ -186,7 +185,7 @@ void cmXCodeScheme::WriteAnalyzeAction(cmXMLWriter& xout,
}
void cmXCodeScheme::WriteArchiveAction(cmXMLWriter& xout,
- std::string configuration)
+ const std::string& configuration)
{
xout.StartElement("ArchiveAction");
xout.BreakAttributes();
@@ -223,8 +222,9 @@ std::string cmXCodeScheme::FindConfiguration(const std::string& name)
//
if (std::find(this->ConfigList.begin(), this->ConfigList.end(), name) ==
this->ConfigList.end() &&
- this->ConfigList.size() > 0)
+ !this->ConfigList.empty()) {
return this->ConfigList[0];
+ }
return name;
}