Commit 090dbf9f authored by Milian Wolff's avatar Milian Wolff
Browse files

Cleanup DUChainPrivate::storeAllInformation

This new code is functionally equivalent but much simpler to
understand. This was suggested by Igor Kushnir, many thanks!
parent c809e5f5
......@@ -717,11 +717,10 @@ public:
//Access the data in the repository, so the bucket isn't unloaded
{
QMutexLocker lock(&m_environmentListInfoMutex);
uint index = m_environmentListInfo.findIndex(EnvironmentInformationListRequest(url));
if (index) {
m_environmentListInfo.itemFromIndex(index);
} else {
lock.unlock();
const auto foundItem
= static_cast<bool>(m_environmentListInfo.findItem(EnvironmentInformationListRequest(url)));
lock.unlock();
if (!foundItem) {
QMutexLocker chainLock(&m_chainsMutex);
qCDebug(LANGUAGE) << "Did not find stored item for" << url.str()
<< "count:" << m_fileEnvironmentInformations.values(url);
......
Supports Markdown
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