]> git.sesse.net Git - stockfish/blobdiff - src/misc.h
Minor cleanups
[stockfish] / src / misc.h
index dcef22a411c2c90276f8c993b13777f84f6f042c..2fd2b408a1261644c7b0c7315f91dcb77cc2bf54 100644 (file)
@@ -90,9 +90,6 @@ static inline const bool IsLittleEndian = (Le.c[0] == 4);
 class RunningAverage {
   public:
 
-      // Constructor
-      RunningAverage() {}
-
       // Reset the running average to rational value p / q
       void set(int64_t p, int64_t q)
         { average = p * PERIOD * RESOLUTION / q; }
@@ -102,10 +99,10 @@ class RunningAverage {
         { average = RESOLUTION * v + (PERIOD - 1) * average / PERIOD; }
 
       // Test if average is strictly greater than rational a / b
-      bool is_greater(int64_t a, int64_t b)
-        { return b * average > a * PERIOD * RESOLUTION ; }
+      bool is_greater(int64_t a, int64_t b) const
+        { return b * average > a * (PERIOD * RESOLUTION); }
 
-      int64_t value()
+      int64_t value() const
         { return average / (PERIOD * RESOLUTION); }
 
   private :