From 2ee93c3f46f8e948d2331eab46c95322a88874ee Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 3 Apr 2026 21:45:17 +0100 Subject: Size-optimise cvar value cleanup Put all the cvars together contiguously; then we don't need to generate lots of individual calls to extfree() and can instead simply iterate a fixed-sized array. --- src/build/gluegen.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/build/gluegen.c') diff --git a/src/build/gluegen.c b/src/build/gluegen.c index b2887a9..3e04db8 100644 --- a/src/build/gluegen.c +++ b/src/build/gluegen.c @@ -867,22 +867,6 @@ F( " if (has_%.*s) _feat_end_%.*s();", } _( "}") _( "") -_( "static inline void freevars() {") - for (int i = 1; i < ncvars; ++i) { -F( " extfree(con_getvarcommon(%.*s)->strval);", - cvar_names[i].len, cvar_names[i].s) - } -_( "}") -_( "") -_( "static inline void shuntvars() {") -_( "#ifdef _WIN32") - for (int i = 1; i < ncvars; ++i) { -F( " __builtin_memmove(&%.*s->v1, &%.*s->v2, ", - cvar_names[i].len, cvar_names[i].s, cvar_names[i].len, cvar_names[i].s) -_( " sizeof(struct con_var_common));") - } -_( "#endif") -_( "}") for (int i = 1; i < nevents; ++i) { const char *prefix = event_predicateflags[i] ? "bool CHECK_" : "void EMIT_"; -- cgit v1.2.3-54-g00ecf