From 301b4c112badbf68edbffe0ac363d1e4f40a4640 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 16 Apr 2016 13:57:29 +0300 Subject: [PATCH] Remove useless programmatical filling of MD5::rotate_table 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. --- source/md5.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/source/md5.cpp b/source/md5.cpp index c989526..1fe7003 100644 --- a/source/md5.cpp +++ b/source/md5.cpp @@ -82,18 +82,6 @@ void MD5::init() 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) -- 2.45.2