forked from qt-creator/qt-creator
Fix build on older Apple Clang
Actually not sooo old.
compilationdbparser.cpp:172:34: error: redefinition of 'it'
Amends f3e164af4f
Change-Id: Ib3fc97b39921138d2a27bbe8f95c504c8823d09f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -84,11 +84,11 @@ CMakeBuildSystem::CMakeBuildSystem(CMakeBuildConfiguration *bc)
|
||||
// Cache mime check result for speed up
|
||||
if (!isIgnored) {
|
||||
if (auto it = m_mimeBinaryCache.get<std::optional<bool>>(
|
||||
[mimeType](const QHash<QString, bool> &cache) -> std::optional<bool> {
|
||||
auto it = cache.find(mimeType.name());
|
||||
if (it != cache.end())
|
||||
return *it;
|
||||
return {};
|
||||
[mimeType](const QHash<QString, bool> &cache) -> std::optional<bool> {
|
||||
auto cache_it = cache.find(mimeType.name());
|
||||
if (cache_it != cache.end())
|
||||
return *cache_it;
|
||||
return {};
|
||||
})) {
|
||||
isIgnored = *it;
|
||||
} else {
|
||||
|
@@ -169,9 +169,9 @@ void CompilationDbParser::start()
|
||||
if (!isIgnored) {
|
||||
if (auto it = m_mimeBinaryCache.get<std::optional<bool>>(
|
||||
[mimeType](const QHash<QString, bool> &cache) -> std::optional<bool> {
|
||||
auto it = cache.find(mimeType.name());
|
||||
if (it != cache.end())
|
||||
return *it;
|
||||
const auto cache_it = cache.find(mimeType.name());
|
||||
if (cache_it != cache.end())
|
||||
return *cache_it;
|
||||
return {};
|
||||
})) {
|
||||
isIgnored = *it;
|
||||
|
Reference in New Issue
Block a user