]> git.sesse.net Git - stockfish/blobdiff - src/position.cpp
Reduce negative quiets by ONE_PLY / 2
[stockfish] / src / position.cpp
index 2266f2a573dfa05e313b0913d903578d1e4ebb2d..4cb7e3063be940f54e919607a760d949b1130317 100644 (file)
@@ -1149,7 +1149,7 @@ void Position::clear() {
   startState.epSquare = SQ_NONE;
   st = &startState;
 
-  for (int i = 0; i < PIECE_TYPE_NB; i++)
+  for (int i = 0; i < PIECE_TYPE_NB; ++i)
       for (int j = 0; j < 16; j++)
           pieceList[WHITE][i][j] = pieceList[BLACK][i][j] = SQ_NONE;
 }
@@ -1428,7 +1428,7 @@ bool Position::pos_is_ok(int* failedStep) const {
   if ((*step)++, debugPieceList)
       for (Color c = WHITE; c <= BLACK; ++c)
           for (PieceType pt = PAWN; pt <= KING; ++pt)
-              for (int i = 0; i < pieceCount[c][pt]; i++)
+              for (int i = 0; i < pieceCount[c][pt];  ++i)
                   if (   board[pieceList[c][pt][i]] != make_piece(c, pt)
                       || index[pieceList[c][pt][i]] != i)
                       return false;