- SplitPoint* sp = threads[threadID].splitPoint;
- Position pos(*sp->pos, threadID);
- SearchStack* ss = sp->sstack[threadID] + 1;
- ss->sp = sp;
-
- if (sp->pvNode)
- search<PV, true>(pos, ss, sp->alpha, sp->beta, sp->depth, sp->ply);
- else
- search<NonPV, true>(pos, ss, sp->alpha, sp->beta, sp->depth, sp->ply);
-
+ SplitPoint* tsp = threads[threadID].splitPoint;
+ Position pos(*tsp->pos, threadID);
+ SearchStack* ss = tsp->sstack[threadID] + 1;
+ ss->sp = tsp;
+
+ if (tsp->pvNode)
+ search<PV, true>(pos, ss, tsp->alpha, tsp->beta, tsp->depth, tsp->ply);
+ else {
+ search<NonPV, true>(pos, ss, tsp->alpha, tsp->beta, tsp->depth, tsp->ply);
+ }