mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 07:27:46 +00:00
Use pre-increment also for native types
Now that we use pre-increment on enums, it make sense, for code style uniformity, to swith to pre-increment also for native types, although there is no speed difference. No functional change.
This commit is contained in:
+2
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user