aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/git
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2019-01-16 14:47:24 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2019-01-16 20:22:56 +0000
commit128a33548badc3cdc1b5658e31115d4a4db95135 (patch)
treed1a97b11e0aeb3a740816cb4f97c2a2428325ab4 /src/plugins/git
parent7f641d3c08b91675b6475c8dee968b072bc3a881 (diff)
Fix warning: "Missing reference in range-for with non trivial type"
[-Wclazy-range-loop] Change-Id: I5dcb263c754d423740e7bce3dcb948d52f2dec67 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Diffstat (limited to 'src/plugins/git')
-rw-r--r--src/plugins/git/gerrit/gerritremotechooser.cpp2
-rw-r--r--src/plugins/git/gitgrep.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/git/gerrit/gerritremotechooser.cpp b/src/plugins/git/gerrit/gerritremotechooser.cpp
index c242b1c6ad..36082a3f26 100644
--- a/src/plugins/git/gerrit/gerritremotechooser.cpp
+++ b/src/plugins/git/gerrit/gerritremotechooser.cpp
@@ -124,7 +124,7 @@ bool GerritRemoteChooser::updateRemotes(bool forceReload)
void GerritRemoteChooser::addRemote(const GerritServer &server, const QString &name)
{
if (!m_allowDups) {
- for (auto remote : m_remotes) {
+ for (const auto &remote : qAsConst(m_remotes)) {
if (remote.second == server)
return;
}
diff --git a/src/plugins/git/gitgrep.cpp b/src/plugins/git/gitgrep.cpp
index 41f35ea4a8..9d21655237 100644
--- a/src/plugins/git/gitgrep.cpp
+++ b/src/plugins/git/gitgrep.cpp
@@ -134,7 +134,7 @@ public:
}
single.matchingLine = text;
- for (auto match : qAsConst(matches)) {
+ for (const auto &match : qAsConst(matches)) {
single.matchStart = match.matchStart;
single.matchLength = match.matchLength;
single.regexpCapturedTexts = match.regexpCapturedTexts;