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:
parent
f7d8ea3866
commit
fe4fda474f
1 changed files with 1 additions and 3 deletions
|
@ -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)) };
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue