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
|
// Cache mime check result for speed up
|
||||||
if (!isIgnored) {
|
if (!isIgnored) {
|
||||||
if (auto it = m_mimeBinaryCache.get<std::optional<bool>>(
|
if (auto it = m_mimeBinaryCache.get<std::optional<bool>>(
|
||||||
[mimeType](const QHash<QString, bool> &cache) -> std::optional<bool> {
|
[mimeType](const QHash<QString, bool> &cache) -> std::optional<bool> {
|
||||||
auto it = cache.find(mimeType.name());
|
auto cache_it = cache.find(mimeType.name());
|
||||||
if (it != cache.end())
|
if (cache_it != cache.end())
|
||||||
return *it;
|
return *cache_it;
|
||||||
return {};
|
return {};
|
||||||
})) {
|
})) {
|
||||||
isIgnored = *it;
|
isIgnored = *it;
|
||||||
} else {
|
} else {
|
||||||
|
@@ -169,9 +169,9 @@ void CompilationDbParser::start()
|
|||||||
if (!isIgnored) {
|
if (!isIgnored) {
|
||||||
if (auto it = m_mimeBinaryCache.get<std::optional<bool>>(
|
if (auto it = m_mimeBinaryCache.get<std::optional<bool>>(
|
||||||
[mimeType](const QHash<QString, bool> &cache) -> std::optional<bool> {
|
[mimeType](const QHash<QString, bool> &cache) -> std::optional<bool> {
|
||||||
auto it = cache.find(mimeType.name());
|
const auto cache_it = cache.find(mimeType.name());
|
||||||
if (it != cache.end())
|
if (cache_it != cache.end())
|
||||||
return *it;
|
return *cache_it;
|
||||||
return {};
|
return {};
|
||||||
})) {
|
})) {
|
||||||
isIgnored = *it;
|
isIgnored = *it;
|
||||||
|
Reference in New Issue
Block a user