]> git.sesse.net Git - stockfish/blobdiff - src/misc.cpp
Fix dbg_mean_of() for negative numbers
[stockfish] / src / misc.cpp
index b650b96094a66d4a0fbaa0c4ce20a86b3d143e42..13923a7b901a75b44ed879a610bf90c1d2e63bdb 100644 (file)
@@ -61,7 +61,7 @@ const string engine_info(bool to_uci) {
 
 /// Debug functions used mainly to collect run-time statistics
 
-static uint64_t hits[2], means[2];
+static int64_t hits[2], means[2];
 
 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); }
@@ -144,10 +144,10 @@ std::ostream& operator<<(std::ostream& os, SyncCout sc) {
 
   static Mutex m;
 
-  if (sc == io_lock)
+  if (sc == IO_LOCK)
       m.lock();
 
-  if (sc == io_unlock)
+  if (sc == IO_UNLOCK)
       m.unlock();
 
   return os;