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

Function Log2i

engine/Poseidon/Graphics/Textures/JpgImport.cpp:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41int Log2i(int x)
42{
43 int n = 0;
44 while (x > 1)
45 {
46 x >>= 1;
47 ++n;
48 }
49 return n;
50}
51
52// Read a whole file. Prefer the engine's FileServer when available (so PBO /
53// search-path resolution works); fall back to std::ifstream in unit-test

Callers 1

InitFromMemoryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected