MCPcopy Create free account
hub / github.com/KDE/kdevelop / allocateItemIndex

Method allocateItemIndex

kdevplatform/language/duchain/topducontextdynamicdata.cpp:324–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322
323template <class Item>
324uint TopDUContextDynamicData::DUChainItemStorage<Item>::allocateItemIndex(const Item& item, const bool temporary)
325{
326 if (!data->m_dataLoaded) {
327 data->loadData();
328 }
329 if (!temporary) {
330 items.append(item);
331 return items.size();
332 } else {
333 temporaryItems.append(item);
334 return 0x0fffffff - temporaryItems.size(); //We always keep the highest bit at zero
335 }
336}
337
338template <class Item>
339bool TopDUContextDynamicData::DUChainItemStorage<Item>::isItemForIndexLoaded(uint index) const

Callers 3

allocateContextIndexMethod · 0.80
allocateProblemIndexMethod · 0.80

Calls 3

loadDataMethod · 0.80
appendMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected