From 7f641d3c08b91675b6475c8dee968b072bc3a881 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Wed, 16 Jan 2019 12:40:15 +0100 Subject: [PATCH] Fix warning: "Mixing iterators with const_iterators" [-Wclazy-strict-iterators] Change-Id: Ibc7e07a0f8390297589656c3c2ddfdd4c0151887 Reviewed-by: Orgad Shaneh --- src/libs/cplusplus/pp-engine.cpp | 2 +- src/plugins/modeleditor/componentviewcontroller.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/cplusplus/pp-engine.cpp b/src/libs/cplusplus/pp-engine.cpp index 5ee8298a724..6ed0bff9ac1 100644 --- a/src/libs/cplusplus/pp-engine.cpp +++ b/src/libs/cplusplus/pp-engine.cpp @@ -1127,7 +1127,7 @@ bool Preprocessor::handleIdentifier(PPToken *tk) } } - m_state.pushTokenBuffer(body.begin(), body.end(), macro); + m_state.pushTokenBuffer(body.constBegin(), body.constEnd(), macro); if (m_client && !idTk.generated()) m_client->stopExpandingMacro(idTk.byteOffset, *macro); diff --git a/src/plugins/modeleditor/componentviewcontroller.cpp b/src/plugins/modeleditor/componentviewcontroller.cpp index 9c578cc29bf..828b2616565 100644 --- a/src/plugins/modeleditor/componentviewcontroller.cpp +++ b/src/plugins/modeleditor/componentviewcontroller.cpp @@ -248,7 +248,7 @@ void UpdateIncludeDependenciesVisitor::collectElementPaths(const ProjectExplorer qmt::MComponent *UpdateIncludeDependenciesVisitor::findComponentFromFilePath(const QString &filePath) { - const auto it = m_filePathComponentsMap.find(filePath); + const auto it = m_filePathComponentsMap.constFind(filePath); if (it != m_filePathComponentsMap.cend()) return it.value();