From 46fc33d9147c843d122d8384ab9c1465ef716ee1 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 1 Apr 2015 11:19:32 +0200 Subject: Don't mix iterator and const_iterator This avoids unnecessary detaches of the Qt container data. The mismatches where detected by defining QT_STRICT_ITERATORS; however, this define violates the ODR (causing linker errors), and therefore is not added permanently. Change-Id: Idd336a9c8b394214a820437ef1b92d2101f6101c GPush-Base: 62b0848b9cf357bcded4184c71d490bae56c773b Reviewed-by: Daniel Teske --- src/plugins/cpptools/cppsourceprocessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/cpptools/cppsourceprocessor.cpp') diff --git a/src/plugins/cpptools/cppsourceprocessor.cpp b/src/plugins/cpptools/cppsourceprocessor.cpp index df792c3bcd..8533257564 100644 --- a/src/plugins/cpptools/cppsourceprocessor.cpp +++ b/src/plugins/cpptools/cppsourceprocessor.cpp @@ -249,8 +249,8 @@ bool CppSourceProcessor::checkFile(const QString &absoluteFilePath) const QString CppSourceProcessor::resolveFile(const QString &fileName, IncludeType type) { if (type == IncludeGlobal) { - QHash::ConstIterator it = m_fileNameCache.find(fileName); - if (it != m_fileNameCache.end()) + QHash::ConstIterator it = m_fileNameCache.constFind(fileName); + if (it != m_fileNameCache.constEnd()) return it.value(); const QString fn = resolveFile_helper(fileName, type); m_fileNameCache.insert(fileName, fn); -- cgit v1.2.1