MCPcopy Create free account
hub / github.com/ddnet/ddnet / FindItemIndexByKey

Method FindItemIndexByKey

src/engine/shared/snapshot.cpp:772–783  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

770}
771
772std::optional<int> CSnapshotBuilder::FindItemIndexByKey(int Key)
773{
774 for(int i = 0; i < m_NumItems; i++)
775 {
776 CSnapshotItem *pItem = GetItem(i);
777 if(pItem->Key() == Key)
778 {
779 return i;
780 }
781 }
782 return std::nullopt;
783}
784
785int CSnapshotBuilder::Finish(void *pSnapData)
786{

Callers 1

UnpackDeltaMethod · 0.80

Calls 1

KeyMethod · 0.80

Tested by

no test coverage detected