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)
commitd7ef09727acc11c91b4a25b775c7f6d0bf1d37d8
tree45179f623ede8c4e993b4d8863a91e2a1c454857
parent683595fee15a1d8ceeb1bbd577d96ed9c0f8aaaa
Silence idiotic warning on two's complement of an unsigned

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>
src/position.cpp