Remove operators for color

This is a non-functional and untested simplification. The increment operator
for color isn't really necessary and seems a bit unnatural to me.

Passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 47027 W: 10589 L: 10518 D: 25920
http://tests.stockfishchess.org/tests/view/5d3472d10ebc5925cf0e8d3e

Closes https://github.com/official-stockfish/Stockfish/pull/2247

No functional change
This commit is contained in:
protonspring
2019-07-16 06:08:58 -06:00
committed by Stéphane Nicolet
parent acdda38b93
commit aec918a2b6
5 changed files with 6 additions and 7 deletions
+2 -2
View File
@@ -1299,8 +1299,8 @@ bool Position::pos_is_ok() const {
assert(0 && "pos_is_ok: Index");
}
for (Color c = WHITE; c <= BLACK; ++c)
for (CastlingSide s = KING_SIDE; s <= QUEEN_SIDE; s = CastlingSide(s + 1))
for (Color c : { WHITE, BLACK })
for (CastlingSide s : {KING_SIDE, QUEEN_SIDE})
{
if (!can_castle(c | s))
continue;