mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-21 09:37:16 +08:00
Rename first_1 / last_1 in lsb / msb
It seems more accurate: lsb is clear while 'first bit' depends from where you look at the bitboard. And fix compile in case of 64 bits platforms that do not use BSFQ intrinsics. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -44,7 +44,7 @@ TranspositionTable::~TranspositionTable() {
|
||||
|
||||
void TranspositionTable::set_size(size_t mbSize) {
|
||||
|
||||
size_t newSize = 1ULL << last_1((mbSize << 20) / sizeof(TTCluster));
|
||||
size_t newSize = 1ULL << msb((mbSize << 20) / sizeof(TTCluster));
|
||||
|
||||
if (newSize == size)
|
||||
return;
|
||||
@@ -60,7 +60,7 @@ void TranspositionTable::set_size(size_t mbSize) {
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
clear(); // operator new is not guaranteed to initialize memory to zero
|
||||
clear(); // Operator new is not guaranteed to initialize memory to zero
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user