projects
/
fairystockfish.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
f7d8ea3
)
Fun with initializer lists in UCI::square
author
Marco Costalba
<mcostalba@gmail.com>
Sun, 18 Jan 2015 10:04:51 +0000 (11:04 +0100)
committer
Marco Costalba
<mcostalba@gmail.com>
Sun, 18 Jan 2015 10:04:51 +0000 (11:04 +0100)
No functional change.
src/uci.cpp
patch
|
blob
|
history
diff --git
a/src/uci.cpp
b/src/uci.cpp
index
dfcce49
..
f05a114
100644
(file)
--- 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)) };
}