]> git.sesse.net Git - stockfish/blobdiff - src/types.h
Simplify Weak Lever
[stockfish] / src / types.h
index 934f884e8fb5b740e3b5f1a40dfcd57560c68b87..c77d804037ee7a094b54843b1482801baa2c6aed 100644 (file)
@@ -345,6 +345,11 @@ inline Score operator*(Score s, int i) {
   return result;
 }
 
+/// Multiplication of a Score by an boolean
+inline Score operator*(Score s, bool b) {
+  return Score(int(s) * int(b));
+}
+
 constexpr Color operator~(Color c) {
   return Color(c ^ BLACK); // Toggle color
 }