Further simplify previous patch
authorMarco Costalba <mcostalba@gmail.com>
Thu, 26 Dec 2013 11:08:23 +0000 (12:08 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 26 Dec 2013 11:08:23 +0000 (12:08 +0100)
Use a single XOR instead of NEGATE + AND

No functional change.

src/pawns.cpp

index 39bd689f2e30c921c60030a5287d5f6ec8b84489..5c7a55be74cccabb5951bf0d764db20f77060f67 100644 (file)
@@ -188,7 +188,7 @@ namespace {
     // to file distance between left and right outermost pawns.
     if (pos.count<PAWN>(Us) > 1)
     {
-        b = ~e->semiopenFiles[Us] & 0xFF;
+        b = e->semiopenFiles[Us] ^ 0xFF;
         value += PawnsFileSpan * int(msb(b) - lsb(b));
     }