]> git.sesse.net Git - stockfish/blobdiff - src/bitboard.cpp
Consolidate CastlingSide and CastlingRights
[stockfish] / src / bitboard.cpp
index 281579c4a621842e312dfe43f7058e6a55fff34e..2afd3766babf552bfecf9639ae99e3991bc59dbf 100644 (file)
@@ -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)