mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Replacing std::clamp with std::min
No functional change closes https://github.com/official-stockfish/Stockfish/pull/6751 No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
7faecd75ac
commit
ed651aab54
+2
-2
@@ -1098,7 +1098,7 @@ moves_loop: // When in check, search starts here
|
||||
}
|
||||
else if (!ss->followPV || !PvNode)
|
||||
{
|
||||
int dIndex = std::clamp(int(depth), 1, int(lmrDivisor.size())) - 1;
|
||||
int dIndex = std::min(int(depth), int(lmrDivisor.size())) - 1;
|
||||
int history = (*contHist[0])[movedPiece][move.to_sq()]
|
||||
+ (*contHist[1])[movedPiece][move.to_sq()]
|
||||
+ sharedHistory.pawn_entry(pos)[movedPiece][move.to_sq()];
|
||||
@@ -1109,7 +1109,7 @@ moves_loop: // When in check, search starts here
|
||||
|
||||
history += 71 * mainHistory[us][move.raw()] / 32;
|
||||
|
||||
// (*Scaler): Generally, lower divisors scales well
|
||||
// (*Scaler): Generally, lower divisors scale well
|
||||
lmrDepth += history / lmrDivisor[dIndex];
|
||||
|
||||
Value futilityValue = ss->staticEval + 42 + 151 * !bestMove + 120 * lmrDepth
|
||||
|
||||
Reference in New Issue
Block a user