+ else
+ {
+ eval = ss->staticEval = evaluate(pos, ss->evalMargin);
+ TT.store(posKey, VALUE_NONE, BOUND_NONE, DEPTH_NONE, MOVE_NONE,
+ ss->staticEval, ss->evalMargin);
+ }
+
+ // Handling of UCI command 'mate in x moves'. We simply return if after
+ // 'x' moves we still have not checkmated the opponent.
+ if (PvNode && !RootNode && !inCheck && Limits.mate && ss->ply > 2 * Limits.mate)
+ return eval;