]> git.sesse.net Git - stockfish/commitdiff
Silence idiotic warning on two's complement of an unsigned
authorMarco Costalba <mcostalba@gmail.com>
Mon, 30 Mar 2009 10:07:45 +0000 (12:07 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 31 Mar 2009 19:50:10 +0000 (20:50 +0100)
MSVC gives:

warning C4146: unary minus operator applied to unsigned type,
               result still unsigned

When finds -b where b is an unsigned integer. So rewrite the two's
complement in a way to avoid the warning. Theoretically the new
version is slower, but in practice changes nothing.

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

No differences found