From 320e2adaff3303b72d97bface2194a7e040df77f Mon Sep 17 00:00:00 2001 From: Mikusch Date: Fri, 2 Dec 2022 01:12:19 +0100 Subject: [PATCH] tf2: Fix duplicate stackalloc in tier0/platform.h (#119) --- public/tier0/platform.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/public/tier0/platform.h b/public/tier0/platform.h index a9e30e07..3a05e20f 100644 --- a/public/tier0/platform.h +++ b/public/tier0/platform.h @@ -358,6 +358,8 @@ typedef void * HINSTANCE; #define mallocsize( _p ) ( _msize( _p ) ) #endif +#define stackfree( _p ) 0 + // Linux had a few areas where it didn't construct objects in the same order that Windows does. // So when CVProfile::CVProfile() would access g_pMemAlloc, it would crash because the allocator wasn't initalized yet. #if defined(_LINUX) || defined(__APPLE__) @@ -459,15 +461,6 @@ typedef void * HINSTANCE; // as little code as possible, and throw an assertion in debug. #define NO_DEFAULT default: UNREACHABLE(); -#ifdef _WIN32 -// Alloca defined for this platform -#define stackalloc( _size ) _alloca( ALIGN_VALUE( _size, 16 ) ) -#define stackfree( _p ) -#elif defined(_LINUX) || defined(__APPLE__) -// Alloca defined for this platform -#define stackalloc( _size ) _alloca( ALIGN_VALUE( _size, 16 ) ) -#define stackfree( _p ) -#endif #ifdef _WIN32 #define RESTRICT __restrict