summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2020-10-15 13:12:07 +0200
committerAndreas Kling <kling@serenityos.org>2020-10-17 23:20:31 +0200
commit43e37c7cdeded3bf844eb19c39049db84873e773 (patch)
tree7cdffaccb6f0a9fa6a3527876e3c5d7ba12d95f0 /Libraries
parent805ed03b486e7ea8732796d2e24a4337e58d378c (diff)
downloadserenity-43e37c7cdeded3bf844eb19c39049db84873e773.zip
LibChess: Use new format functions.
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibChess/UCICommand.cpp18
-rw-r--r--Libraries/LibChess/UCIEndpoint.cpp6
2 files changed, 12 insertions, 12 deletions
diff --git a/Libraries/LibChess/UCICommand.cpp b/Libraries/LibChess/UCICommand.cpp
index 82fcbd1f71..056a65b39d 100644
--- a/Libraries/LibChess/UCICommand.cpp
+++ b/Libraries/LibChess/UCICommand.cpp
@@ -202,23 +202,23 @@ String GoCommand::to_string() const
if (ponder)
builder.append(" ponder");
if (wtime.has_value())
- builder.appendf(" wtime %i", wtime.value());
+ builder.appendff(" wtime {}", wtime.value());
if (btime.has_value())
- builder.appendf(" btime %i", btime.value());
+ builder.appendff(" btime {}", btime.value());
if (winc.has_value())
- builder.appendf(" winc %i", winc.value());
+ builder.appendff(" winc {}", winc.value());
if (binc.has_value())
- builder.appendf(" binc %i", binc.value());
+ builder.appendff(" binc {}", binc.value());
if (movestogo.has_value())
- builder.appendf(" movestogo %i", movestogo.value());
+ builder.appendff(" movestogo {}", movestogo.value());
if (depth.has_value())
- builder.appendf(" depth %i", depth.value());
+ builder.appendff(" depth {}", depth.value());
if (nodes.has_value())
- builder.appendf(" nodes %i", nodes.value());
+ builder.appendff(" nodes {}", nodes.value());
if (mate.has_value())
- builder.appendf(" mate %i", mate.value());
+ builder.appendff(" mate {}", mate.value());
if (movetime.has_value())
- builder.appendf(" movetime %i", movetime.value());
+ builder.appendff(" movetime {}", movetime.value());
if (infinite)
builder.append(" infinite");
diff --git a/Libraries/LibChess/UCIEndpoint.cpp b/Libraries/LibChess/UCIEndpoint.cpp
index e28a1bbc27..1b7fc07f54 100644
--- a/Libraries/LibChess/UCIEndpoint.cpp
+++ b/Libraries/LibChess/UCIEndpoint.cpp
@@ -45,7 +45,7 @@ Endpoint::Endpoint(NonnullRefPtr<Core::IODevice> in, NonnullRefPtr<Core::IODevic
void Endpoint::send_command(const Command& command)
{
#ifdef UCI_DEBUG
- dbg() << class_name() << " Sent UCI Command: " << String(command.to_string().characters(), Chomp);
+ dbgln("{} Sent UCI Command: {}", class_name(), String(command.to_string().characters(), Chomp));
#endif
m_out->write(command.to_string());
}
@@ -96,7 +96,7 @@ NonnullOwnPtr<Command> Endpoint::read_command()
String line(ReadonlyBytes(m_in->read_line(4096).bytes()), Chomp);
#ifdef UCI_DEBUG
- dbg() << class_name() << " Received UCI Command: " << line;
+ dbgln("{} Received UCI Command: {}", class_name(), line);
#endif
if (line == "uci") {
@@ -125,7 +125,7 @@ NonnullOwnPtr<Command> Endpoint::read_command()
return make<InfoCommand>(InfoCommand::from_string(line));
}
- dbg() << "command line: " << line;
+ dbgln("command line: {}", line);
ASSERT_NOT_REACHED();
}