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:
Marco Costalba
2013-10-13 02:20:35 -07:00
parent b15e148b5e
commit 549b5c478f
3 changed files with 12 additions and 13 deletions

View File

@@ -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];
}