The table is so small that static initialization is easier, and in fact
the initializer is already there so the code wasn't even run.
if(!sin_table[0])
for(unsigned i=0; i<64; ++i)
sin_table[i] = 4294967296.0*abs(sin((i+1)*1.0));
-
- if(!rotate_table[0])
- {
- for(unsigned i=0; i<4; ++i)
- rotate_table[i] = 7+i*5;
- for(unsigned i=0; i<4; ++i)
- rotate_table[4+i] = 5+i*4+i*i/3;
- for(unsigned i=0; i<4; ++i)
- rotate_table[8+i] = 4+i*7;
- for(unsigned i=0; i<4; ++i)
- rotate_table[12+i] = 6+i*4+i*i/3;
- }
}
void MD5::update(const char *data, unsigned len)