From: Marco Costalba Date: Sat, 7 Feb 2015 10:15:38 +0000 (+0100) Subject: Rename dbg_hit_on_c() to dbg_hit_on() X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=8b0fee9998e2ae530fa57e55f6cf145779aef3d0 Rename dbg_hit_on_c() to dbg_hit_on() 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. --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 822be015..be3c6497 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -559,7 +559,7 @@ namespace { & pos.pieces(Them) & ~ei.attackedBy[Us][PAWN]; - if(b) + if (b) score += popcount(b) * PawnAttackThreat; if (Trace) diff --git a/src/misc.cpp b/src/misc.cpp index 2f99668d..1674c2a6 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -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]; } -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() { diff --git a/src/misc.h b/src/misc.h index e3fb6435..9d3c58c8 100644 --- a/src/misc.h +++ b/src/misc.h @@ -32,7 +32,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(); diff --git a/src/position.cpp b/src/position.cpp index c0c26f03..cc320b4b 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -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;