Avoid constructing an empty tuple in qsearch

Avoid constructing, passing as a parameter and binding a useless empty tuple of pointers in the qsearch move picker constructor.

Also reformat the scoring function in movepicker.cpp and do some cleaning in evaluate.cpp while there.

No functional change.
This commit is contained in:
Stéphane Nicolet
2017-08-21 18:59:24 +02:00
committed by Marco Costalba
parent 5ea327d924
commit 002bf4d8db
5 changed files with 34 additions and 27 deletions

View File

@@ -1246,8 +1246,7 @@ moves_loop: // When in check search starts from here
// to search the moves. Because the depth is <= 0 here, only captures,
// queen promotions and checks (only if depth >= DEPTH_QS_CHECKS) will
// be generated.
const PieceToHistory* contHist[4] = {};
MovePicker mp(pos, ttMove, depth, &pos.this_thread()->mainHistory, contHist, to_sq((ss-1)->currentMove));
MovePicker mp(pos, ttMove, depth, &pos.this_thread()->mainHistory, to_sq((ss-1)->currentMove));
// Loop through the moves until no moves remain or a beta cutoff occurs
while ((move = mp.next_move()) != MOVE_NONE)