From daa55cade14146f04814cf8a7ad2028becf4db66 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Mon, 10 Mar 2025 20:37:28 +0000 Subject: Use C23 void-argument-free prototypes In the future we can also consider moving to {} instead of {0} for initialisers, but my old Clang (16) doesn't support this, so it might be wise to wait longer on that one so people don't need too bleeding-edge of a compiler just to build this thing. --- src/demorec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/demorec.c') diff --git a/src/demorec.c b/src/demorec.c index 66ffa1d..039b24e 100644 --- a/src/demorec.c +++ b/src/demorec.c @@ -52,8 +52,8 @@ bool demorec_forceauto = false; #define SIGNONSTATE_SPAWN 5 #define SIGNONSTATE_FULL 6 -DEF_PREDICATE(DemoControlAllowed, void) -DEF_EVENT(DemoRecordStarting, void) +DEF_PREDICATE(DemoControlAllowed) +DEF_EVENT(DemoRecordStarting) DEF_EVENT(DemoRecordStopped, int) typedef void (*VCALLCONV SetSignonState_func)(void *, int); @@ -169,7 +169,7 @@ static void hook_stop_cb(const struct con_cmdargs *args) { wantstop = false; } -static inline bool find_demorecorder(void) { +static inline bool find_demorecorder() { #ifdef _WIN32 const uchar *insns = (const uchar *)orig_stop_cb; // The stop command loads `demorecorder` into ECX to call IsRecording() @@ -241,7 +241,7 @@ bool demorec_start(const char *name) { return *recording; } -int demorec_stop(void) { +int demorec_stop() { // note: our set-to-0-and-back hack actually has the nice side effect of // making this correct when recording and stopping in the menu lol int ret = *demonum; @@ -250,7 +250,7 @@ int demorec_stop(void) { return ret; } -int demorec_demonum(void) { +int demorec_demonum() { return *recording ? *demonum : -1; } -- cgit v1.2.3-54-g00ecf