From: Marco Costalba Date: Sun, 12 Apr 2009 15:45:33 +0000 (+0100) Subject: Re-fix square.h warning to avoid a compile error under MSVC X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=44b497a9728e27489e0da3e41957402f9efed7fc;ds=sidebyside Re-fix square.h warning to avoid a compile error under MSVC This fix adds ugliness to an already ugly previous fix...hopefully it is the last one :-( Signed-off-by: Marco Costalba --- diff --git a/src/square.h b/src/square.h index 5ebfcc39..9683e930 100644 --- a/src/square.h +++ b/src/square.h @@ -164,7 +164,7 @@ inline File file_from_char(char c) { } inline char file_to_char(File f) { - return char(f - FILE_A + 'a'); + return char(f - FILE_A + int('a')); } inline Rank rank_from_char(char c) { @@ -172,7 +172,7 @@ inline Rank rank_from_char(char c) { } inline char rank_to_char(Rank r) { - return char(r - RANK_1 + '1'); + return char(r - RANK_1 + int('1')); } inline Square square_from_string(const std::string& str) {