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:
Kojirion
2013-09-15 09:11:29 +02:00
committed by Marco Costalba
parent 7a1ff6d8ff
commit a71209868b
11 changed files with 24 additions and 24 deletions
+2 -2
View 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;