diff --git a/src/search.cpp b/src/search.cpp index e352c96e33e..c797b841b5c 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -538,7 +538,10 @@ Value Search::Worker::search( // Dive into quiescence search when the depth reaches zero if (depth <= 0) - return qsearch < PvNode ? PV : NonPV > (pos, ss, alpha, beta); + { + constexpr auto nt = PvNode ? PV : NonPV; + return qsearch(pos, ss, alpha, beta); + } // Limit the depth if extensions made it too large depth = std::min(depth, MAX_PLY - 1);