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

Method lengthFromIndex

kdevplatform/serialization/indexedstring.cpp:351–362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351int IndexedString::lengthFromIndex(uint index)
352{
353 if (!index) {
354 return 0;
355 } else if (isSingleCharIndex(index)) {
356 return 1;
357 } else {
358 return LockedItemRepository::read<IndexedString>([index](const IndexedStringRepository& repo) {
359 return repo.itemFromIndex(index)->length;
360 });
361 }
362}
363
364const char* IndexedString::c_str() const
365{

Callers

nothing calls this directly

Calls 2

isSingleCharIndexFunction · 0.85
itemFromIndexMethod · 0.45

Tested by

no test coverage detected