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

Method typeForIndex

kdevplatform/language/duchain/types/typerepository.cpp:137–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135}
136
137AbstractType::Ptr TypeRepository::typeForIndex(uint index)
138{
139 if (index == 0)
140 return AbstractType::Ptr();
141
142 return LockedItemRepository::read<AbstractType>([index](const TypeItemRepository& repo) {
143 auto item = repo.itemFromIndex(index);
144 return AbstractType::Ptr(TypeSystem::self().create(const_cast<AbstractTypeData*>(item)));
145 });
146}
147
148template <typename RefCountChanger>
149static void changeReferenceCount(uint index, RefCountChanger changeRefCount)

Callers

nothing calls this directly

Calls 2

itemFromIndexMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected