X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=7d982c7f45bc1232eb850af7d1b3527195ae22a0;hp=d75606ef02ab06a869c73244af95f64bd01f048a;hb=6661a3154152ab448b1dc11d882586976f616f92;hpb=6c4257520847f7bb0f4008dedb65159cbacce106 diff --git a/src/search.cpp b/src/search.cpp index d75606ef..7d982c7f 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -783,10 +783,9 @@ namespace { moves_loop: // When in check and at SpNode search starts from here Square prevMoveSq = to_sq((ss-1)->currentMove); - Move countermoves[] = { Countermoves[pos.piece_on(prevMoveSq)][prevMoveSq].first, - Countermoves[pos.piece_on(prevMoveSq)][prevMoveSq].second }; + Move countermove = Countermoves[pos.piece_on(prevMoveSq)][prevMoveSq]; - MovePicker mp(pos, ttMove, depth, History, CounterMovesHistory, countermoves, ss); + MovePicker mp(pos, ttMove, depth, History, CounterMovesHistory, countermove, ss); CheckInfo ci(pos); value = bestValue; // Workaround a bogus 'uninitialized' warning under gcc improving = ss->staticEval >= (ss-2)->staticEval @@ -965,7 +964,7 @@ moves_loop: // When in check and at SpNode search starts from here [pos.piece_on(to_sq(move))][to_sq(move)] < VALUE_ZERO)) ss->reduction += ONE_PLY; - if (move == countermoves[0] || move == countermoves[1]) + if (move == countermove) ss->reduction = std::max(DEPTH_ZERO, ss->reduction - ONE_PLY); // Decrease reduction for moves that escape a capture