diff --git a/src/search.cpp b/src/search.cpp index f184a353..1f19c74d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -536,7 +536,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);