mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 17:16:33 +08:00
Remove unuseful optimization in RKISS
Don't need a struct here. Speed test shows result is teh same. Moreover RKISS is used mainly at startup to compute magics, so prefer to keep it simple...RKISS ;-) Also some assorted triviality while there. No functional change.
This commit is contained in:
@@ -1067,7 +1067,7 @@ int Position::see(Move m, int asymmThreshold) const {
|
||||
|
||||
from = from_sq(m);
|
||||
to = to_sq(m);
|
||||
swapList[0] = PieceValue[MG][type_of(piece_on(to))];
|
||||
swapList[0] = PieceValue[MG][piece_on(to)];
|
||||
stm = color_of(piece_on(from));
|
||||
occupied = pieces() ^ from;
|
||||
|
||||
@@ -1134,7 +1134,7 @@ int Position::see(Move m, int asymmThreshold) const {
|
||||
// Having built the swap list, we negamax through it to find the best
|
||||
// achievable score from the point of view of the side to move.
|
||||
while (--slIndex)
|
||||
swapList[slIndex-1] = std::min(-swapList[slIndex], swapList[slIndex-1]);
|
||||
swapList[slIndex - 1] = std::min(-swapList[slIndex], swapList[slIndex - 1]);
|
||||
|
||||
return swapList[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user