mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-22 01:56:58 +08: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:
committed by
Joona Kiiski
parent
9ba391c5cb
commit
5ab55827b8
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user