Set back static constexpr

closes https://github.com/official-stockfish/Stockfish/pull/6243

No functional change
This commit is contained in:
FauziAkram
2025-08-24 19:39:49 +02:00
committed by Joost VandeVondele
parent 20bc19558e
commit 176ef577e2
+3 -3
View File
@@ -99,7 +99,7 @@ void update_correction_history(const Position& pos,
const Move m = (ss - 1)->currentMove;
const Color us = pos.side_to_move();
const int nonPawnWeight = 165;
constexpr int nonPawnWeight = 165;
workerThread.pawnCorrectionHistory[pawn_correction_history_index(pos)][us] << bonus;
workerThread.minorPieceCorrectionHistory[minor_piece_index(pos)][us] << bonus * 145 / 128;
@@ -839,7 +839,7 @@ Value Search::Worker::search(
// The depth condition is important for mate finding.
{
auto futility_margin = [&](Depth d) {
Value futilityMult = 91 - 21 * (!ss->ttHit);
Value futilityMult = 91 - 21 * !ss->ttHit;
return futilityMult * d //
- 2094 * improving * futilityMult / 1024 //
@@ -1855,7 +1855,7 @@ void update_all_stats(const Position& pos,
// Updates histories of the move pairs formed by moves
// at ply -1, -2, -3, -4, and -6 with current move.
void update_continuation_histories(Stack* ss, Piece pc, Square to, int bonus) {
const std::array<ConthistBonus, 6> conthist_bonuses = {
static constexpr std::array<ConthistBonus, 6> conthist_bonuses = {
{{1, 1157}, {2, 648}, {3, 288}, {4, 576}, {5, 140}, {6, 441}}};
for (const auto [i, weight] : conthist_bonuses)