mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-20 07:03:46 +00:00
offsetof is actually a standard thing nowadays it would seem
This commit is contained in:
parent
d89c3b7c6f
commit
5d89ab126d
1 changed files with 1 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue