Skip to content

Commit

Permalink
Further simplify previous patch
Browse files Browse the repository at this point in the history
Use a single XOR instead of NEGATE + AND

No functional change.
  • Loading branch information
mcostalba committed Dec 26, 2013
1 parent cf0a2a2 commit 14aebe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pawns.cpp
Expand Up @@ -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));
}

Expand Down

0 comments on commit 14aebe2

Please sign in to comment.