]> git.sesse.net Git - stockfish/commitdiff
Fix gcc PGO build on Windows
authorRonald de Man <ronalddeman@gmail.com>
Sat, 10 Feb 2018 00:44:05 +0000 (01:44 +0100)
committerStéphane Nicolet <cassio@free.fr>
Mon, 12 Feb 2018 22:14:33 +0000 (23:14 +0100)
This fixes the issue #1375 of the PGO builds failing under Windows:
https://github.com/official-stockfish/Stockfish/issues/1375

Solution found during this discussion in the fishcooking forum:
https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/RjIPgeFFLPQ

Closes #1408.

No functional change.

src/uci.cpp

index adba98da2087215559467bd8da79042b02aba6c2..b477230594f831a778b494507992cf29370b1627 100644 (file)
@@ -89,11 +89,11 @@ namespace {
 
     // Read option name (can contain spaces)
     while (is >> token && token != "value")
-        name += string(" ", name.empty() ? 0 : 1) + token;
+        name += (name.empty() ? "" : " ") + token;
 
     // Read option value (can contain spaces)
     while (is >> token)
-        value += string(" ", value.empty() ? 0 : 1) + token;
+        value += (value.empty() ? "" : " ") + token;
 
     if (Options.count(name))
         Options[name] = value;