mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 07:27:46 +00:00
Renaming some variables in code
Implements renaming suggestions by Marco Costalba, Günther Demetz, Gontran Lemaire, Ronald de Man, Stéphane Nicolet, Alain Savard, Joost VandeVondele, Jerry Donald Watson, Mike Whiteley, xoto10, and I hope that I haven't forgotten anybody. Perpetual renaming thread for suggestions: https://github.com/official-stockfish/Stockfish/issues/1426 No functional change.
This commit is contained in:
+5
-5
@@ -455,12 +455,12 @@ void Thread::search() {
|
||||
timeReduction *= 1.25;
|
||||
|
||||
// Use part of the gained time from a previous stable move for the current move
|
||||
double unstablePvFactor = 1.0 + mainThread->bestMoveChanges;
|
||||
unstablePvFactor *= std::pow(mainThread->previousTimeReduction, 0.528) / timeReduction;
|
||||
double bestMoveInstability = 1.0 + mainThread->bestMoveChanges;
|
||||
bestMoveInstability *= std::pow(mainThread->previousTimeReduction, 0.528) / timeReduction;
|
||||
|
||||
// Stop the search if we have only one legal move, or if available time elapsed
|
||||
if ( rootMoves.size() == 1
|
||||
|| Time.elapsed() > Time.optimum() * unstablePvFactor * improvingFactor / 581)
|
||||
|| Time.elapsed() > Time.optimum() * bestMoveInstability * improvingFactor / 581)
|
||||
{
|
||||
// If we are allowed to ponder do not stop the search now but
|
||||
// keep pondering until the GUI sends "ponderhit" or "stop".
|
||||
@@ -495,7 +495,7 @@ namespace {
|
||||
if (depth < ONE_PLY)
|
||||
return qsearch<NT>(pos, ss, alpha, beta);
|
||||
|
||||
const bool PvNode = NT == PV;
|
||||
constexpr bool PvNode = NT == PV;
|
||||
const bool rootNode = PvNode && ss->ply == 0;
|
||||
|
||||
assert(-VALUE_INFINITE <= alpha && alpha < beta && beta <= VALUE_INFINITE);
|
||||
@@ -1156,7 +1156,7 @@ moves_loop: // When in check, search starts from here
|
||||
template <NodeType NT>
|
||||
Value qsearch(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth) {
|
||||
|
||||
const bool PvNode = NT == PV;
|
||||
constexpr bool PvNode = NT == PV;
|
||||
const bool inCheck = bool(pos.checkers());
|
||||
|
||||
assert(alpha >= -VALUE_INFINITE && alpha < beta && beta <= VALUE_INFINITE);
|
||||
|
||||
Reference in New Issue
Block a user