From: Marco Costalba Date: Sun, 18 Jan 2015 10:04:51 +0000 (+0100) Subject: Fun with initializer lists in UCI::square X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=fe4fda474fb8b0cb582c8232be602e2d323c87eb Fun with initializer lists in UCI::square No functional change. --- diff --git a/src/uci.cpp b/src/uci.cpp index dfcce497..f05a114e 100644 --- a/src/uci.cpp +++ b/src/uci.cpp @@ -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)) }; }