From 98378138a521fa52758f1ed3501900e6c323c474 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 18 Jan 2022 22:56:54 +0000 Subject: Very slightly tidy RTTI stuff More handwavey Linux prep, nothing too significant. --- src/con_.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/con_.c') diff --git a/src/con_.c b/src/con_.c index 357430b..7525229 100644 --- a/src/con_.c +++ b/src/con_.c @@ -96,7 +96,7 @@ static inline void initval(struct con_var *v) { // right next to each other. static int vtidx_InternalSetValue; -// implementatiosn of virtual functions for our vars and commands below... +// implementation of virtual functions for our vars and commands below... static void VCALLCONV dtor(void *_) {} // we don't use constructors/destructors @@ -305,16 +305,16 @@ void *_con_vtab_cmd[14 + NVDTOR] = { // the engine does dynamic_casts on ConVar at some points so we have to fill out // bare minimum rtti to prevent crashes. oh goody. #ifdef _WIN32 -DEF_MSVC_BASIC_RTTI(static, varrtti, _con_realvtab_var, "sst_ConVar") +DEF_MSVC_BASIC_RTTI(static, varrtti, _con_vtab_var, "sst_ConVar") +#else +DEF_ITANIUM_BASIC_RTTI(static, varrtti, "sst_ConVar") #endif -void *_con_realvtab_var[20] = { -#ifdef _WIN32 - &varrtti, -#else - // this, among many other things, will be totally different on linux -#warning FIX THIS TOO! +struct _con_vtab_var_wrap _con_vtab_var_wrap = { +#ifndef _WIN32 + 0, // this *is* the top, no offset needed :) #endif + &varrtti, (void *)&dtor, #ifndef _WIN32 (void *)&dtor, -- cgit v1.2.3