X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fbitboard.cpp;fp=src%2Fbitboard.cpp;h=2afd3766babf552bfecf9639ae99e3991bc59dbf;hp=281579c4a621842e312dfe43f7058e6a55fff34e;hb=aec918a2b6ee931826ef19db1726950976da7ffe;hpb=acdda38b93361f10e331a6d951d6870577efdace 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)