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

Function RemoveBank

engine/Poseidon/Network/Network.cpp:272–288  ·  view source on GitHub ↗

Destroy file bank with given prefix

Source from the content-addressed store, hash-verified

270
271// Destroy file bank with given prefix
272void RemoveBank(const char* prefix)
273{
274 int prefixLen = strlen(prefix);
275 for (int i = 0; i < GFileBanks.Size();)
276 {
277 QFBank& bank = GFileBanks[i];
278 if (strnicmp(bank.GetPrefix(), prefix, prefixLen) == 0)
279 {
280 GFileServer->FlushBank(&bank);
281 GFileBanks.Delete(i);
282 }
283 else
284 {
285 i++;
286 }
287 }
288}
289
290extern bool EnumModDirectories(ModDirectoryCallback callback, void* context);
291

Callers 3

OnMessageMethod · 0.85
CreateMPMissionBankFunction · 0.85
CreateMissionMethod · 0.85

Calls 5

strnicmpFunction · 0.50
SizeMethod · 0.45
GetPrefixMethod · 0.45
FlushBankMethod · 0.45
DeleteMethod · 0.45

Tested by

no test coverage detected