MCPcopy Create free account
hub / github.com/diasurgical/devilution / GetFileFlagIndex

Function GetFileFlagIndex

3rdParty/StormLib/src/SBaseFileTable.cpp:29–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29static DWORD GetFileFlagIndex(LPDWORD FlagArray, DWORD dwFlags)
30{
31 // Find free or equal entry in the flag array
32 for(DWORD dwFlagIndex = 0; dwFlagIndex < MAX_FLAG_INDEX; dwFlagIndex++)
33 {
34 if(FlagArray[dwFlagIndex] == INVALID_FLAG_VALUE || FlagArray[dwFlagIndex] == dwFlags)
35 {
36 FlagArray[dwFlagIndex] = dwFlags;
37 return dwFlagIndex;
38 }
39 }
40
41 // This should never happen
42 assert(false);
43 return 0xFFFFFFFF;
44}
45
46static DWORD GetNecessaryBitCount(ULONGLONG MaxValue)
47{

Callers 2

CreateBetHeaderFunction · 0.85
TranslateBetTableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected