]> git.sesse.net Git - stockfish/commitdiff
Micro-optimize color_of()
authorMarco Costalba <mcostalba@gmail.com>
Wed, 5 Dec 2012 10:05:32 +0000 (11:05 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 8 Dec 2012 11:32:48 +0000 (12:32 +0100)
In almost all cases we already know in advance that
color_of() argument is different from NO_PIECE.

So avoid the check for NO_PIECE in color_of() and
test at caller site in the very few places where
this case could occur.

As a nice side effect, this patch fixes a (bogus)
warning under some versions of gcc.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>

No differences found