From fe4fda474fb8b0cb582c8232be602e2d323c87eb Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 18 Jan 2015 11:04:51 +0100 Subject: [PATCH] Fun with initializer lists in UCI::square No functional change. --- src/uci.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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)) }; } -- 2.39.2