Changeset View
Changeset View
Standalone View
Standalone View
kdevplatform/language/duchain/duchain.cpp
Show First 20 Lines • Show All 1631 Lines • ▼ Show 20 Line(s) | 1629 | { | |||
---|---|---|---|---|---|
1632 | if(TopDUContextDynamicData::fileExists(ret)) | 1632 | if(TopDUContextDynamicData::fileExists(ret)) | ||
1633 | { | 1633 | { | ||
1634 | qCWarning(LANGUAGE) << "Problem in the management of available top-context indices"; | 1634 | qCWarning(LANGUAGE) << "Problem in the management of available top-context indices"; | ||
1635 | return newTopContextIndex(); | 1635 | return newTopContextIndex(); | ||
1636 | } | 1636 | } | ||
1637 | return ret; | 1637 | return ret; | ||
1638 | } | 1638 | } | ||
1639 | } | 1639 | } | ||
1640 | static QAtomicInt& currentId( globalItemRepositoryRegistry().getCustomCounter(QStringLiteral("Top-Context Counter"), 1) ); | 1640 | static QAtomicInt& currentId( globalItemRepositoryRegistry().customCounter(QStringLiteral("Top-Context Counter"), 1) ); | ||
1641 | return currentId.fetchAndAddRelaxed(1); | 1641 | return currentId.fetchAndAddRelaxed(1); | ||
1642 | } | 1642 | } | ||
1643 | 1643 | | |||
1644 | void DUChain::refCountUp(TopDUContext* top) { | 1644 | void DUChain::refCountUp(TopDUContext* top) { | ||
1645 | QMutexLocker l(&sdDUChainPrivate->m_referenceCountsMutex); | 1645 | QMutexLocker l(&sdDUChainPrivate->m_referenceCountsMutex); | ||
1646 | // note: value is default-constructed to zero if it does not exist | 1646 | // note: value is default-constructed to zero if it does not exist | ||
1647 | ++sdDUChainPrivate->m_referenceCounts[top]; | 1647 | ++sdDUChainPrivate->m_referenceCounts[top]; | ||
1648 | } | 1648 | } | ||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |