Commit fb72d532 authored by hjk's avatar hjk Committed by Erik Verbruggen

C++: Also cache result of misses in resolveFile()

Change-Id: Ib501bbe16548b194ff5028a1b3ab74c5f0e3230d
Reviewed-by: default avatarErik Verbruggen <>
parent 980fe320
......@@ -342,12 +342,10 @@ bool CppPreprocessor::checkFile(const QString &absoluteFilePath) const
QString CppPreprocessor::resolveFile(const QString &fileName, IncludeType type)
if (type == IncludeGlobal) {
QString fn = m_fileNameCache.value(fileName);
if (! fn.isEmpty())
return fn;
fn = resolveFile_helper(fileName, type);
QHash<QString, QString>::ConstIterator it = m_fileNameCache.find(fileName);
if (it != m_fileNameCache.end())
return it.value();
const QString fn = resolveFile_helper(fileName, type);
m_fileNameCache.insert(fileName, fn);
return fn;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment