summaryrefslogtreecommitdiff
path: root/src/command/AllCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-05-21 20:35:29 +0200
committerMax Kellermann <max@musicpd.org>2021-05-25 16:01:56 +0200
commit0440c41cbac0857eaab1220e3b0852c61bfc794a (patch)
tree1d4117a3cce00c6a6ea278fa7da20da221b191bc /src/command/AllCommands.cxx
parenta9c704b76e05571043ece260f517bfe7dc759195 (diff)
client/Response: add method Fmt() based on libfmt
Diffstat (limited to 'src/command/AllCommands.cxx')
-rw-r--r--src/command/AllCommands.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx
index 9a36b9bdb..ab1d72f2d 100644
--- a/src/command/AllCommands.cxx
+++ b/src/command/AllCommands.cxx
@@ -48,6 +48,8 @@
#include "StickerCommands.hxx"
#endif
+#include <fmt/format.h>
+
#include <cassert>
#include <iterator>
@@ -253,7 +255,7 @@ PrintAvailableCommands(Response &r, const Partition &partition,
if (cmd->permission == (permission & cmd->permission) &&
command_available(partition, cmd))
- r.Format("command: %s\n", cmd->cmd);
+ r.Fmt(FMT_STRING("command: {}\n"), cmd->cmd);
}
return CommandResult::OK;
@@ -266,7 +268,7 @@ PrintUnavailableCommands(Response &r, unsigned permission) noexcept
const struct command *cmd = &i;
if (cmd->permission != (permission & cmd->permission))
- r.Format("command: %s\n", cmd->cmd);
+ r.Fmt(FMT_STRING("command: {}\n"), cmd->cmd);
}
return CommandResult::OK;