]> 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:15:38 +0000 (11:15 +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];
 
        &  pos.pieces(Them)
        & ~ei.attackedBy[Us][PAWN];
 
-    if(b)
+    if (b)
         score += popcount<Max15>(b) * PawnAttackThreat;
 
     if (Trace)
         score += popcount<Max15>(b) * PawnAttackThreat;
 
     if (Trace)
index 2f99668d4457941b3d9ca0e2b5d0fba56890563a..1674c2a602b85f02e54c1690696ff8f2630440ce 100644 (file)
@@ -135,7 +135,7 @@ Time::point Time::now() {
 /// Debug functions used mainly to collect run-time statistics
 
 void dbg_hit_on(bool b) { ++hits[0]; if (b) ++hits[1]; }
 /// 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() {
 void dbg_mean_of(int v) { ++means[0]; means[1] += v; }
 
 void dbg_print() {
index e3fb6435471510bb80a91304bc0b322fec4ff7ca..9d3c58c87d2859d16a1286155917c1816ec55f84 100644 (file)
@@ -32,7 +32,7 @@ void prefetch(char* addr);
 void start_logger(bool b);
 
 void dbg_hit_on(bool b);
 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();
 
 void dbg_mean_of(int v);
 void dbg_print();
 
index c0c26f038d5c5b4de7caa59d0a9e2f6a4041ce2c..cc320b4b3e45d55aba64cbc2194f71795ba5d35f 100644 (file)
@@ -47,7 +47,7 @@ namespace Zobrist {
   Key exclusion;
 }
 
   Key exclusion;
 }
 
-Key Position::exclusion_key() const { return st->key ^ Zobrist::exclusion;}
+Key Position::exclusion_key() const { return st->key ^ Zobrist::exclusion; }
 
 namespace {
 
 
 namespace {
 
@@ -1060,8 +1060,8 @@ Value Position::see(Move m) const {
   stm = color_of(piece_on(from));
   occupied = pieces() ^ from;
 
   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;
   // unless in the rare case the rook ends up under attack.
   if (type_of(m) == CASTLING)
       return VALUE_ZERO;