Int to Char warning fixed changing the function
signature to int.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
static const char PieceChars[] = " pnbrqk";
static const char PieceChars[] = " pnbrqk";
-char piece_type_to_char(PieceType pt, bool upcase) {
+int piece_type_to_char(PieceType pt, bool upcase) {
return upcase? toupper(PieceChars[pt]) : PieceChars[pt];
}
return upcase? toupper(PieceChars[pt]) : PieceChars[pt];
}
-extern char piece_type_to_char(PieceType pt, bool upcase = false);
+extern int piece_type_to_char(PieceType pt, bool upcase = false);
extern PieceType piece_type_from_char(char c);
extern PieceType piece_type_from_char(char c);
return File(c - 'a') + FILE_A;
}
return File(c - 'a') + FILE_A;
}
-inline char file_to_char(File f) {
- return char(f - FILE_A) + 'a';
+inline int file_to_char(File f) {
+ return int(f - FILE_A) + 'a';
}
inline Rank rank_from_char(char c) {
return Rank(c - '1') + RANK_1;
}
}
inline Rank rank_from_char(char c) {
return Rank(c - '1') + RANK_1;
}
-inline char rank_to_char(Rank r) {
- return char(r - RANK_1) + '1';
+inline int rank_to_char(Rank r) {
+ return int(r - RANK_1) + '1';
}
inline Square square_from_string(const std::string& str) {
}
inline Square square_from_string(const std::string& str) {