aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@qt.io>2023-10-20 14:46:33 +0200
committerCristian Adam <cristian.adam@qt.io>2023-10-20 13:57:20 +0000
commit43121fa574c2de4c8b5268e707104552894aab9e (patch)
treeee0650fdfff208f586c63cc1395734b60f0de90c
parent60de12efd2cc3afeea140746d757989ed0f9873b (diff)
CMakePM: clang-tidy fix for 'perf*-unnecessary-copy-initialization'
Change-Id: I9c407f7254328e7278096239f6f3946c34e873d5 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp6
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp2
-rw-r--r--src/plugins/cmakeprojectmanager/cmaketool.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
index 2646c5c580..b02b2e779c 100644
--- a/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeconfigitem.cpp
@@ -372,9 +372,9 @@ CMakeConfig CMakeConfig::fromFile(const Utils::FilePath &cacheFile, QString *err
continue;
QTC_ASSERT(pieces.size() == 3, continue);
- const QByteArray key = pieces.at(0);
- const QByteArray type = pieces.at(1);
- const QByteArray value = pieces.at(2);
+ const QByteArray &key = pieces.at(0);
+ const QByteArray &type = pieces.at(1);
+ const QByteArray &value = pieces.at(2);
if (key.endsWith("-ADVANCED") && value == "1") {
advancedSet.insert(key.left(key.size() - 9 /* "-ADVANCED" */));
diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp
index 583729ee93..74d5056bf7 100644
--- a/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeprojectimporter.cpp
@@ -1085,7 +1085,7 @@ void CMakeProjectImporter::persistTemporaryCMake(Kit *k, const QVariantList &vl)
if (vl.isEmpty())
return; // No temporary CMake
QTC_ASSERT(vl.count() == 1, return);
- const QVariant data = vl.at(0);
+ const QVariant &data = vl.at(0);
CMakeTool *tmpCmake = CMakeToolManager::findById(Id::fromSetting(data));
CMakeTool *actualCmake = CMakeKitAspect::cmakeTool(k);
diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp
index e50cecc821..f9d7149a34 100644
--- a/src/plugins/cmakeprojectmanager/cmaketool.cpp
+++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp
@@ -490,7 +490,7 @@ void CMakeTool::parseFunctionDetailsOutput(const QString &output)
const QStringList lines = output.split('\n');
for (int i = 0; i < lines.count(); ++i) {
- const QString line = lines.at(i);
+ const QString &line = lines.at(i);
if (line == "::") {
expectDefinition = true;