X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Ftt.cpp;h=46d891cd04f1558e76b0f2b9161d872c1928694a;hp=248cbad96d930baebe75d7bae3536145a69ccd1a;hb=24ba204931901c26960a97f07e3344b6d62b883f;hpb=6b354305e1ff27fcfa65c57ed92bd03160c3d5ca diff --git a/src/tt.cpp b/src/tt.cpp index 248cbad9..46d891cd 100644 --- a/src/tt.cpp +++ b/src/tt.cpp @@ -30,11 +30,9 @@ TranspositionTable TT; // Our global transposition table /// measured in megabytes. Transposition table consists of a power of 2 number /// of clusters and each cluster consists of TTClusterSize number of TTEntry. -void TranspositionTable::resize(uint64_t mbSize) { +void TranspositionTable::resize(size_t mbSize) { - assert(msb((mbSize * 1024 * 1024) / sizeof(TTCluster)) < 32); - - uint32_t newClusterCount = 1 << msb((mbSize * 1024 * 1024) / sizeof(TTCluster)); + size_t newClusterCount = size_t(1) << msb((mbSize * 1024 * 1024) / sizeof(TTCluster)); if (newClusterCount == clusterCount) return;