]> git.sesse.net Git - stockfish/commitdiff
Rename dbg_hit_on_c() to dbg_hit_on()
authorMarco Costalba <mcostalba@gmail.com>
Sat, 7 Feb 2015 10:15:38 +0000 (11:15 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 7 Feb 2015 10:18:06 +0000 (11:18 +0100)
Use an overload instead of a new named function.

I have found this handier and easier when adding
some quick debug code.

No functional change.

src/evaluate.cpp
src/misc.cpp
src/misc.h
src/position.cpp

index 822be015bdf6395c6a66f34ebf926f7849f4415e..be3c64977be4b001e70f8a3e57dc324d88da04a0 100644 (file)
@@ -559,7 +559,7 @@ namespace {
        &  pos.pieces(Them)
        & ~ei.attackedBy[Us][PAWN];
 
-    if(b)
+    if (b)
         score += popcount<Max15>(b) * PawnAttackThreat;
 
     if (Trace)
index 656b31557ea381a67a47274a98d014365ef6ae14..aa2b23310da53ffd558bc41c4d62ece3c3dd8d33 100644 (file)
@@ -126,7 +126,7 @@ const string engine_info(bool to_uci) {
 /// Debug functions used mainly to collect run-time statistics
 
 void dbg_hit_on(bool b) { ++hits[0]; if (b) ++hits[1]; }
-void dbg_hit_on_c(bool c, bool b) { if (c) dbg_hit_on(b); }
+void dbg_hit_on(bool c, bool b) { if (c) dbg_hit_on(b); }
 void dbg_mean_of(int v) { ++means[0]; means[1] += v; }
 
 void dbg_print() {
index 965a0ee8444e7be4a05adcb7fa123f649ef10487..246a56a016594bff70e628c360011480c14a5cdf 100644 (file)
@@ -33,7 +33,7 @@ void prefetch(char* addr);
 void start_logger(bool b);
 
 void dbg_hit_on(bool b);
-void dbg_hit_on_c(bool c, bool b);
+void dbg_hit_on(bool c, bool b);
 void dbg_mean_of(int v);
 void dbg_print();
 
index 994e1c767ccfc05cce8e41c4bf35bab967a4c484..ef31d58db62f3069e706f31ba6ba2239b2509b95 100644 (file)
@@ -47,7 +47,7 @@ namespace Zobrist {
   Key exclusion;
 }
 
-Key Position::exclusion_key() const { return st->key ^ Zobrist::exclusion;}
+Key Position::exclusion_key() const { return st->key ^ Zobrist::exclusion; }
 
 namespace {
 
@@ -1060,8 +1060,8 @@ Value Position::see(Move m) const {
   stm = color_of(piece_on(from));
   occupied = pieces() ^ from;
 
-  // Castling moves are implemented as king capturing the rook so cannot be
-  // handled correctly. Simply return 0 that is always the correct value
+  // Castling moves are implemented as king capturing the rook so cannot
+  // be handled correctly. Simply return VALUE_ZERO that is always correct
   // unless in the rare case the rook ends up under attack.
   if (type_of(m) == CASTLING)
       return VALUE_ZERO;