]> git.sesse.net Git - stockfish/commitdiff
Pass Position as const ref in update_stats()
authorReuven Peleg <reuvenpe2005@gmail.com>
Thu, 8 May 2014 20:18:19 +0000 (23:18 +0300)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 8 May 2014 20:36:30 +0000 (22:36 +0200)
No functional change.

src/search.cpp

index 74851fb2058e7354da21f5ab0806404268e4878d..f2f640da6326a6dbfcf80cd1a156d80a5ad519fd 100644 (file)
@@ -94,7 +94,7 @@ namespace {
   void id_loop(Position& pos);
   Value value_to_tt(Value v, int ply);
   Value value_from_tt(Value v, int ply);
-  void update_stats(Position& pos, Stack* ss, Move move, Depth depth, Move* quiets, int quietsCnt);
+  void update_stats(const Position& pos, Stack* ss, Move move, Depth depth, Move* quiets, int quietsCnt);
   string uci_pv(const Position& pos, int depth, Value alpha, Value beta);
 
   struct Skill {
@@ -1267,7 +1267,7 @@ moves_loop: // When in check and at SpNode search starts from here
   // update_stats() updates killers, history, countermoves and followupmoves stats after a fail-high
   // of a quiet move.
 
-  void update_stats(Position& pos, Stack* ss, Move move, Depth depth, Move* quiets, int quietsCnt) {
+  void update_stats(const Position& pos, Stack* ss, Move move, Depth depth, Move* quiets, int quietsCnt) {
 
     if (ss->killers[0] != move)
     {