@@ -817,7 +817,7 @@ void Position::do_move(Move m, StateInfo& newSt, bool givesCheck) {
817817 st->nonPawnMaterial [us] += PieceValue[MG][promotion];
818818 }
819819
820- // Update pawn hash key and prefetch access to pawnsTable
820+ // Update pawn hash key
821821 st->pawnKey ^= Zobrist::psq[pc][from] ^ Zobrist::psq[pc][to];
822822
823823 // Reset rule 50 draw counter
@@ -944,7 +944,7 @@ void Position::do_castling(Color us, Square from, Square& to, Square& rfrom, Squ
944944}
945945
946946
947- // / Position::do(undo)_null_move() is used to do(undo) a "null move": It flips
947+ // / Position::do(undo)_null_move() is used to do(undo) a "null move": it flips
948948// / the side to move without executing any move on the board.
949949
950950void Position::do_null_move (StateInfo& newSt) {
@@ -1027,24 +1027,24 @@ bool Position::see_ge(Move m, Value threshold) const {
10271027 if (swap <= 0 )
10281028 return true ;
10291029
1030- Bitboard occ = pieces () ^ from ^ to;
1030+ Bitboard occupied = pieces () ^ from ^ to;
10311031 Color stm = color_of (piece_on (from));
1032- Bitboard attackers = attackers_to (to, occ );
1032+ Bitboard attackers = attackers_to (to, occupied );
10331033 Bitboard stmAttackers, bb;
10341034 int res = 1 ;
10351035
10361036 while (true )
10371037 {
10381038 stm = ~stm;
1039- attackers &= occ ;
1039+ attackers &= occupied ;
10401040
10411041 // If stm has no more attackers then give up: stm loses
10421042 if (!(stmAttackers = attackers & pieces (stm)))
10431043 break ;
10441044
10451045 // Don't allow pinned pieces to attack (except the king) as long as
10461046 // there are pinners on their original square.
1047- if (st->pinners [~stm] & occ )
1047+ if (st->pinners [~stm] & occupied )
10481048 stmAttackers &= ~st->blockersForKing [stm];
10491049
10501050 if (!stmAttackers)
@@ -1059,44 +1059,44 @@ bool Position::see_ge(Move m, Value threshold) const {
10591059 if ((swap = PawnValueMg - swap) < res)
10601060 break ;
10611061
1062- occ ^= lsb (bb);
1063- attackers |= attacks_bb<BISHOP>(to, occ ) & pieces (BISHOP, QUEEN);
1062+ occupied ^= lsb (bb);
1063+ attackers |= attacks_bb<BISHOP>(to, occupied ) & pieces (BISHOP, QUEEN);
10641064 }
10651065
10661066 else if ((bb = stmAttackers & pieces (KNIGHT)))
10671067 {
10681068 if ((swap = KnightValueMg - swap) < res)
10691069 break ;
10701070
1071- occ ^= lsb (bb);
1071+ occupied ^= lsb (bb);
10721072 }
10731073
10741074 else if ((bb = stmAttackers & pieces (BISHOP)))
10751075 {
10761076 if ((swap = BishopValueMg - swap) < res)
10771077 break ;
10781078
1079- occ ^= lsb (bb);
1080- attackers |= attacks_bb<BISHOP>(to, occ ) & pieces (BISHOP, QUEEN);
1079+ occupied ^= lsb (bb);
1080+ attackers |= attacks_bb<BISHOP>(to, occupied ) & pieces (BISHOP, QUEEN);
10811081 }
10821082
10831083 else if ((bb = stmAttackers & pieces (ROOK)))
10841084 {
10851085 if ((swap = RookValueMg - swap) < res)
10861086 break ;
10871087
1088- occ ^= lsb (bb);
1089- attackers |= attacks_bb<ROOK>(to, occ ) & pieces (ROOK, QUEEN);
1088+ occupied ^= lsb (bb);
1089+ attackers |= attacks_bb<ROOK>(to, occupied ) & pieces (ROOK, QUEEN);
10901090 }
10911091
10921092 else if ((bb = stmAttackers & pieces (QUEEN)))
10931093 {
10941094 if ((swap = QueenValueMg - swap) < res)
10951095 break ;
10961096
1097- occ ^= lsb (bb);
1098- attackers |= (attacks_bb<BISHOP>(to, occ ) & pieces (BISHOP, QUEEN))
1099- | (attacks_bb<ROOK >(to, occ ) & pieces (ROOK , QUEEN));
1097+ occupied ^= lsb (bb);
1098+ attackers |= (attacks_bb<BISHOP>(to, occupied ) & pieces (BISHOP, QUEEN))
1099+ | (attacks_bb<ROOK >(to, occupied ) & pieces (ROOK , QUEEN));
11001100 }
11011101
11021102 else // KING
@@ -1105,7 +1105,7 @@ bool Position::see_ge(Move m, Value threshold) const {
11051105 return (attackers & ~pieces (stm)) ? res ^ 1 : res;
11061106 }
11071107
1108- return res;
1108+ return bool ( res) ;
11091109}
11101110
11111111// / Position::is_draw() tests whether the position is drawn by 50-move rule
0 commit comments