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

Method SnapGetItem

src/tools/demo_extract_chat.cpp:77–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75 }
76
77 IClient::CSnapItem SnapGetItem(int SnapId, int Index)
78 {
79 dbg_assert(SnapId >= 0 && SnapId < IClient::NUM_SNAPSHOT_TYPES, "Invalid SnapId: %d", SnapId);
80 const CSnapshot *pSnapshot = m_apAltSnapshots[SnapId];
81 const CSnapshotItem *pSnapshotItem = m_apAltSnapshots[SnapId]->GetItem(Index);
82 IClient::CSnapItem Item;
83 Item.m_Type = pSnapshot->GetItemType(Index);
84 Item.m_Id = pSnapshotItem->Id();
85 Item.m_pData = pSnapshotItem->Data();
86 Item.m_DataSize = pSnapshot->GetItemSize(Index);
87 return Item;
88 }
89
90 void OnNewSnapshot()
91 {

Callers

nothing calls this directly

Calls 5

GetItemTypeMethod · 0.80
GetItemMethod · 0.45
IdMethod · 0.45
DataMethod · 0.45
GetItemSizeMethod · 0.45

Tested by

no test coverage detected