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/engineapi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/engineapi.c') diff --git a/src/engineapi.c b/src/engineapi.c index f3c8c6d..04e6a8c 100644 --- a/src/engineapi.c +++ b/src/engineapi.c @@ -24,6 +24,7 @@ #include "gameinfo.h" #include "gametype.h" #include "intdefs.h" +#include "langext.h" #include "mem.h" // " #include "os.h" #include "vcall.h" @@ -50,7 +51,7 @@ DECL_VFUNC_DYN(void *, GetAllServerClasses) #include // generated by build/mkentprops.c bool engineapi_init(int pluginver) { - if (!con_detect(pluginver)) return false; + if_cold (!con_detect(pluginver)) return false; pluginhandler = factory_engine("ISERVERPLUGINHELPERS001", 0); if (engclient = factory_engine("VEngineClient015", 0)) { @@ -104,7 +105,7 @@ bool engineapi_init(int pluginver) { gamedata_init(); con_init(); - if (!gameinfo_init()) { con_disconnect(); return false; } + if_cold (!gameinfo_init()) { con_disconnect(); return false; } return true; } -- cgit v1.2.3