From f8b5e7e2c9d726c77842a3aea460dcfc7bc903fe Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Thu, 21 Jan 2016 15:58:14 +0100 Subject: [PATCH] Removes XORMiniHash, unused --- include/util/xor_fast_hash.hpp | 36 ---------------------------------- 1 file changed, 36 deletions(-) diff --git a/include/util/xor_fast_hash.hpp b/include/util/xor_fast_hash.hpp index 54f9d67d9..49a59f756 100644 --- a/include/util/xor_fast_hash.hpp +++ b/include/util/xor_fast_hash.hpp @@ -61,42 +61,6 @@ class XORFastHash return table1[lsb] ^ table2[msb]; } }; - -class XORMiniHash -{ // 256 entries - std::vector table1; - std::vector table2; - std::vector table3; - std::vector table4; - - public: - XORMiniHash() - { - table1.resize(1 << 8); - table2.resize(1 << 8); - table3.resize(1 << 8); - table4.resize(1 << 8); - for (unsigned i = 0; i < (1 << 8); ++i) - { - table1[i] = static_cast(i); - table2[i] = static_cast(i); - table3[i] = static_cast(i); - table4[i] = static_cast(i); - } - std::random_shuffle(table1.begin(), table1.end()); - std::random_shuffle(table2.begin(), table2.end()); - std::random_shuffle(table3.begin(), table3.end()); - std::random_shuffle(table4.begin(), table4.end()); - } - unsigned char operator()(const unsigned originalValue) const - { - unsigned char byte1 = ((originalValue)&0xff); - unsigned char byte2 = ((originalValue >> 8) & 0xff); - unsigned char byte3 = ((originalValue >> 16) & 0xff); - unsigned char byte4 = ((originalValue >> 24) & 0xff); - return table1[byte1] ^ table2[byte2] ^ table3[byte3] ^ table4[byte4]; - } -}; } }