From 83da606072ce272eb053d4e1497d77e647cfecae Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sat, 3 Aug 2024 23:40:31 +0100 Subject: Revise syntax macros and add a ton of branch hints My new programming style is branch hints. All non-confusing branches must be hinted when I can be bothered. It's faster, sometimes, maybe. Also, start trying to use more signed sizes in at least some of the places where it makes sense. Unsigned sizes are surprisingly error-prone! --- src/alias.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/alias.c') diff --git a/src/alias.c b/src/alias.c index 6af7467..e6f5f7e 100644 --- a/src/alias.c +++ b/src/alias.c @@ -1,5 +1,5 @@ /* - * Copyright © 2023 Michael Smith + * Copyright © 2024 Michael Smith * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -94,10 +94,10 @@ INIT { if (GAMETYPE_MATCHES(Portal2)) return false; struct con_cmd *cmd_alias = con_findcmd("alias"); - if (!find_alias_head(con_getcmdcb(cmd_alias))) { + if_cold (!find_alias_head(con_getcmdcb(cmd_alias))) { errmsg_warnx("couldn't find alias list"); return false; - }; + } con_reg(sst_alias_clear); con_reg(sst_alias_remove); return true; -- cgit v1.2.3