MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / InitCRCTable

Function InitCRCTable

PanzerChasm/save_load.cpp:28–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26static unsigned int g_crc_table[256u];
27
28static void InitCRCTable()
29{
30 unsigned int crc;
31
32 for(unsigned int i= 0u; i < 256u; i++ )
33 {
34 crc= i;
35 for(unsigned int j= 0u; j < 8u; j++ )
36 crc= ( ( crc & 1u ) != 0u ) ? ( (crc>>1u) ^ 0xEDB88320u ) : ( crc >> 1u );
37
38 g_crc_table[i]= crc;
39 }
40}
41
42// TODO - init table at compile time.
43static const bool g_crc_table_init=

Callers 1

save_load.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected