mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
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.
This commit is contained in:
parent
35aa21c1fe
commit
170bdf40cd
4 changed files with 6 additions and 6 deletions
|
@ -559,7 +559,7 @@ namespace {
|
||||||
& pos.pieces(Them)
|
& pos.pieces(Them)
|
||||||
& ~ei.attackedBy[Us][PAWN];
|
& ~ei.attackedBy[Us][PAWN];
|
||||||
|
|
||||||
if(b)
|
if (b)
|
||||||
score += popcount<Max15>(b) * PawnAttackThreat;
|
score += popcount<Max15>(b) * PawnAttackThreat;
|
||||||
|
|
||||||
if (Trace)
|
if (Trace)
|
||||||
|
|
|
@ -126,7 +126,7 @@ const string engine_info(bool to_uci) {
|
||||||
/// Debug functions used mainly to collect run-time statistics
|
/// 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(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_mean_of(int v) { ++means[0]; means[1] += v; }
|
||||||
|
|
||||||
void dbg_print() {
|
void dbg_print() {
|
||||||
|
|
|
@ -33,7 +33,7 @@ void prefetch(char* addr);
|
||||||
void start_logger(bool b);
|
void start_logger(bool b);
|
||||||
|
|
||||||
void dbg_hit_on(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_mean_of(int v);
|
||||||
void dbg_print();
|
void dbg_print();
|
||||||
|
|
||||||
|
|
|
@ -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));
|
stm = color_of(piece_on(from));
|
||||||
occupied = pieces() ^ from;
|
occupied = pieces() ^ from;
|
||||||
|
|
||||||
// Castling moves are implemented as king capturing the rook so cannot be
|
// Castling moves are implemented as king capturing the rook so cannot
|
||||||
// handled correctly. Simply return 0 that is always the correct value
|
// be handled correctly. Simply return VALUE_ZERO that is always correct
|
||||||
// unless in the rare case the rook ends up under attack.
|
// unless in the rare case the rook ends up under attack.
|
||||||
if (type_of(m) == CASTLING)
|
if (type_of(m) == CASTLING)
|
||||||
return VALUE_ZERO;
|
return VALUE_ZERO;
|
||||||
|
|
Loading…
Add table
Reference in a new issue