X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.cpp;h=2afd3766babf552bfecf9639ae99e3991bc59dbf;hp=281579c4a621842e312dfe43f7058e6a55fff34e;hb=3984b8f8f0e1f53c737020c936f2a8372029545d;hpb=4e72e2a964754611de85536c13ae069f85839b85 diff --git a/src/bitboard.cpp b/src/bitboard.cpp index 281579c4..2afd3766 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -80,7 +80,7 @@ void Bitboards::init() { int steps[][5] = { {}, { 7, 9 }, { 6, 10, 15, 17 }, {}, {}, {}, { 1, 7, 8, 9 } }; - for (Color c = WHITE; c <= BLACK; ++c) + for (Color c : { WHITE, BLACK }) for (PieceType pt : { PAWN, KNIGHT, KING }) for (Square s = SQ_A1; s <= SQ_H8; ++s) for (int i = 0; steps[pt][i]; ++i)