diff --git a/src/search.cpp b/src/search.cpp index 286b339c0..7068c332d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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 conthist_bonuses = { + static constexpr std::array conthist_bonuses = { {{1, 1157}, {2, 648}, {3, 288}, {4, 576}, {5, 140}, {6, 441}}}; for (const auto [i, weight] : conthist_bonuses)