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/fixes.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/fixes.c') diff --git a/src/fixes.c b/src/fixes.c index dbb60f5..e6432c3 100644 --- a/src/fixes.c +++ b/src/fixes.c @@ -1,5 +1,5 @@ /* - * Copyright © 2024 Michael Smith + * Copyright © 2025 Michael Smith * Copyright © 2023 Hayden K * * Permission to use, copy, modify, and/or distribute this software for any @@ -44,7 +44,7 @@ static void chcmdflags(const char *name, int unset, int set) { if (v) v->base.flags = v->base.flags & ~unset | set; } -static void generalfixes(void) { +static void generalfixes() { // Expose all the demo stuff, for games like L4D that hide it for some // reason. unhide("demo_debug"); @@ -104,7 +104,7 @@ static void generalfixes(void) { } } -static void l4d2specific(void) { +static void l4d2specific() { // L4D2 doesn't let you set sv_cheats in lobbies, but turns out it skips all // the lobby checks if this random command is developer-only, presumably // because that flag is compiled out in debug builds and devs want to be @@ -163,7 +163,7 @@ e: chcmdflags("cl_fullupdate", CON_CHEAT, 0); } -static void l4d1specific(void) { +static void l4d1specific() { // For some reason, L4D1 hides mat_monitorgamma and doesn't archive it. // This means on every startup it's necessary to manually set non-default // values via the menu. This change here brings it in line with pretty much @@ -186,7 +186,7 @@ static void l4d1specific(void) { chcmdflags("update_addon_paths", 0, CON_CCMDEXEC); } -static void portal1specific(void) { +static void portal1specific() { #ifdef _WIN32 // TODO(compat): this is an absolutely atrocious way to implement this. it // should only be temporary in the interests of getting 4104 working right @@ -210,7 +210,7 @@ static void portal1specific(void) { #endif } -void fixes_apply(void) { +void fixes_apply() { generalfixes(); if (GAMETYPE_MATCHES(L4D1)) l4d1specific(); else if (GAMETYPE_MATCHES(L4D2x)) l4d2specific(); -- cgit v1.2.3-54-g00ecf