1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 00:33:09 +00:00

Fix an obscure gcc warning

warning: narrowing conversion from ‘int’ to ‘char’ inside { }
is ill-formed in C++11 [-Wnarrowing]

When pedantic meets esoteric!

No functional change.
This commit is contained in:
Marco Costalba 2014-10-26 08:14:36 +01:00 committed by Joona Kiiski
parent 9ba391c5cb
commit 5ab55827b8

View file

@ -241,7 +241,8 @@ string UCI::format_value(Value v, Value alpha, Value beta) {
std::string UCI::format_square(Square s) {
char ch[] = { 'a' + file_of(s), '1' + rank_of(s), 0 }; // Zero-terminating
char ch[] = { char('a' + file_of(s)),
char('1' + rank_of(s)), 0 }; // Zero-terminating
return ch;
}