summaryrefslogtreecommitdiffstats
path: root/src/CommandOutput.h
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2020-05-05 23:52:14 +0200
committerGitHub <noreply@github.com>2020-05-05 23:52:14 +0200
commit57952505e522be868a5a8270d8670163b55ebade (patch)
treecf3c5544612b8a51075b498fa14dba8fe758d656 /src/CommandOutput.h
parentRequire semi-colon at end of function-like macros (#4719) (diff)
downloadcuberite-57952505e522be868a5a8270d8670163b55ebade.tar
cuberite-57952505e522be868a5a8270d8670163b55ebade.tar.gz
cuberite-57952505e522be868a5a8270d8670163b55ebade.tar.bz2
cuberite-57952505e522be868a5a8270d8670163b55ebade.tar.lz
cuberite-57952505e522be868a5a8270d8670163b55ebade.tar.xz
cuberite-57952505e522be868a5a8270d8670163b55ebade.tar.zst
cuberite-57952505e522be868a5a8270d8670163b55ebade.zip
Diffstat (limited to '')
-rw-r--r--src/CommandOutput.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/CommandOutput.h b/src/CommandOutput.h
index 6cba4de7f..cb40b05a6 100644
--- a/src/CommandOutput.h
+++ b/src/CommandOutput.h
@@ -17,9 +17,14 @@ class cCommandOutputCallback
public:
virtual ~cCommandOutputCallback() {} // Force a virtual destructor in subclasses
+ void vOut(const char * a_Fmt, fmt::printf_args);
+
/** Syntax sugar function, calls Out() with Printf()-ed parameters; appends a newline" */
- void Out(const char * a_Fmt, fmt::ArgList);
- FMT_VARIADIC(void, Out, const char *)
+ template <typename... Args>
+ void Out(const char * a_Fmt, const Args & ... a_Args)
+ {
+ vOut(a_Fmt, fmt::make_printf_args(a_Args...));
+ }
/** Called when the command wants to output anything; may be called multiple times */
virtual void Out(const AString & a_Text) = 0;