Use distance<file>() function in endgame.cpp
authorjoergoster <osterj165@googlemail.com>
Wed, 8 Jul 2015 11:48:42 +0000 (13:48 +0200)
committerJoona Kiiski <joona.kiiski@gmail.com>
Sun, 12 Jul 2015 19:48:50 +0000 (20:48 +0100)
This one occurance of distance function was most likely overlooked.

No functional change.

Resolves #376

src/endgame.cpp

index 836621d..daef61f 100644 (file)
@@ -471,7 +471,7 @@ ScaleFactor Endgame<KRPKR>::operator()(const Position& pos) const {
   if (   r == RANK_6
       && distance(bksq, queeningSq) <= 1
       && rank_of(wksq) + tempo <= RANK_6
-      && (rank_of(brsq) == RANK_1 || (!tempo && distance(file_of(brsq), f) >= 3)))
+      && (rank_of(brsq) == RANK_1 || (!tempo && distance<File>(brsq, wpsq) >= 3)))
       return SCALE_FACTOR_DRAW;
 
   if (   r >= RANK_6