MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / DeleteLast

Method DeleteLast

engine/Poseidon/IO/FileServer.cpp:55–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void FileCache::DeleteLast()
56{
57 if (_cache.Size() <= 0)
58 {
59 return;
60 }
61 FileInCache* file = _cache[_cache.Size() - 1];
62 PoseidonAssert(file->_data.tellg() == 0);
63 _size -= file->_data.rest();
64 PoseidonAssert(_size >= 0);
65 _cache.Delete(_cache.Size() - 1);
66}
67
68//! average expected file size is 64 KB
69const int FileCacheItemMemSize = 64 * 1024;

Callers

nothing calls this directly

Calls 4

tellgMethod · 0.80
restMethod · 0.80
SizeMethod · 0.45
DeleteMethod · 0.45

Tested by

no test coverage detected