diff options
| author | Scott Gasch <[email protected]> | 2018-10-03 20:38:03 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2018-10-03 20:38:03 -0700 |
| commit | 98e8d2445213432c65ae48cfa76c863aae1139e7 (patch) | |
| tree | 2b2a48828fdb0fa5f29698b7c9cd31427728203f /src/chess.h | |
| parent | 23c44f05a0956ecba918a336b30c6eccf0a996d5 (diff) | |
Update codebase to remove clang warnings (and a couple of legit errors
it found)
Diffstat (limited to 'src/chess.h')
| -rwxr-xr-x | src/chess.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chess.h b/src/chess.h index c815701..2bfec4d 100755 --- a/src/chess.h +++ b/src/chess.h @@ -1233,8 +1233,8 @@ _assert(CHAR *szFile, ULONG uLine); RANK1(c) || \ FILEA(c) || \ FILEH(c)) -#define CORNER_DISTANCE(c) (MAX(MIN((ULONG)abs(RANK(c) - 7), RANK(c)),\ - MIN((ULONG)abs(FILE(c) - 7), FILE(c)))) +#define CORNER_DISTANCE(c) (MAX(MIN((ULONG)(RANK(c) - 7), RANK(c)),\ + MIN((ULONG)(FILE(c) - 7), FILE(c)))) #define IN_CORNER(c) (((c) == A8) || \ ((c) == A1) || \ ((c) == H8) || \ |
