1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 11:39:15 +00:00

Fun with initializer lists in UCI::square

No functional change.
This commit is contained in:
Marco Costalba 2015-01-18 11:04:51 +01:00
parent f7d8ea3866
commit fe4fda474f

View file

@ -232,9 +232,7 @@ string UCI::value(Value v) {
/// UCI::square() converts a Square to a string in algebraic notation (g1, a7, etc.)
std::string UCI::square(Square s) {
char sq[] = { char('a' + file_of(s)), char('1' + rank_of(s)), 0 }; // NULL terminated
return sq;
return std::string{ char('a' + file_of(s)), char('1' + rank_of(s)) };
}