forked from qt-creator/qt-creator
Use qAsConst with non-const Qt containers in range-loops
... in various places Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -343,9 +343,9 @@ void CompilerOptionsBuilder::addHeaderPathOptions()
|
||||
using ProjectExplorer::HeaderPath;
|
||||
using ProjectExplorer::HeaderPathType;
|
||||
|
||||
for (const HeaderPath &headerPath : filter.userHeaderPaths)
|
||||
for (const HeaderPath &headerPath : qAsConst(filter.userHeaderPaths))
|
||||
addIncludeDirOptionForPath(headerPath);
|
||||
for (const HeaderPath &headerPath : filter.systemHeaderPaths)
|
||||
for (const HeaderPath &headerPath : qAsConst(filter.systemHeaderPaths))
|
||||
addIncludeDirOptionForPath(headerPath);
|
||||
|
||||
if (m_useTweakedHeaderPaths != UseTweakedHeaderPaths::No) {
|
||||
@@ -356,7 +356,7 @@ void CompilerOptionsBuilder::addHeaderPathOptions()
|
||||
m_options.prepend("-nostdinc++");
|
||||
m_options.prepend("-nostdinc");
|
||||
|
||||
for (const HeaderPath &headerPath : filter.builtInHeaderPaths)
|
||||
for (const HeaderPath &headerPath : qAsConst(filter.builtInHeaderPaths))
|
||||
addIncludeDirOptionForPath(headerPath);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user