mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08:00
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:
committed by
Stéphane Nicolet
parent
acdda38b93
commit
aec918a2b6
@@ -140,7 +140,7 @@ Entry* probe(const Position& pos) {
|
||||
if ((e->evaluationFunction = Endgames::probe<Value>(key)) != nullptr)
|
||||
return e;
|
||||
|
||||
for (Color c = WHITE; c <= BLACK; ++c)
|
||||
for (Color c : { WHITE, BLACK })
|
||||
if (is_KXK(pos, c))
|
||||
{
|
||||
e->evaluationFunction = &EvaluateKXK[c];
|
||||
@@ -160,7 +160,7 @@ Entry* probe(const Position& pos) {
|
||||
// We didn't find any specialized scaling function, so fall back on generic
|
||||
// ones that refer to more than one material distribution. Note that in this
|
||||
// case we don't return after setting the function.
|
||||
for (Color c = WHITE; c <= BLACK; ++c)
|
||||
for (Color c : { WHITE, BLACK })
|
||||
{
|
||||
if (is_KBPsK(pos, c))
|
||||
e->scalingFunction[c] = &ScaleKBPsK[c];
|
||||
|
||||
Reference in New Issue
Block a user