From 5d89ab126dff69dfa087b4435357c4bfc942c99d Mon Sep 17 00:00:00 2001 From: Azaezel Date: Fri, 3 Jul 2015 02:52:08 -0500 Subject: [PATCH] offsetof is actually a standard thing nowadays it would seem --- Engine/source/console/consoleTypes.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Engine/source/console/consoleTypes.h b/Engine/source/console/consoleTypes.h index 4e9d180e9..c026b8e1a 100644 --- a/Engine/source/console/consoleTypes.h +++ b/Engine/source/console/consoleTypes.h @@ -48,11 +48,7 @@ /// @{ #ifndef Offset -#if defined(TORQUE_COMPILER_GCC) && (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)) -#define Offset(m,T) ((int)(&((T *)1)->m) - 1) -#else -#define Offset(x, cls) ((dsize_t)((const char *)&(((cls *)0)->x)-(const char *)0)) -#endif +#define Offset(x, cls) offsetof(cls, x) #endif class GFXShader;