Introduce distance() and unify some API
[stockfish] / src / pawns.cpp
index 3634f95746796afef7ab904856629b59d2c970fa..1099c5a48a67a9e5f15f1526ce720c299800c06a 100644 (file)
@@ -165,7 +165,7 @@ namespace {
             value -= UnsupportedPawnPenalty;
 
         if (doubled)
-            value -= Doubled[f] / rank_distance(s, lsb(doubled));
+            value -= Doubled[f] / distance<Rank>(s, Square(lsb(doubled)));
 
         if (backward)
             value -= Backward[opposed][f];