A small clean up of previous patch suggested by Marco
authorJoona Kiiski <joona.kiiski@gmail.com>
Mon, 27 Oct 2014 20:14:58 +0000 (20:14 +0000)
committerJoona Kiiski <joona.kiiski@gmail.com>
Mon, 27 Oct 2014 20:26:12 +0000 (20:26 +0000)
No functional change

src/evaluate.cpp

index d5a4bb9..e4ade31 100644 (file)
@@ -500,9 +500,9 @@ namespace {
     assert(target & (pos.pieces(C) ^ pos.pieces(C, KING)));
 
     PieceType pt;
-    for (pt = QUEEN; pt >= KNIGHT; --pt)
+    for (pt = QUEEN; pt > PAWN; --pt)
         if (target & pos.pieces(C, pt))
-            break;
+            return pt;
 
     return pt;
   }