mirror of
https://github.com/BinomialLLC/basis_universal.git
synced 2026-10-02 23:25:24 +00:00
Merge pull request #137 from ondys/patch-2
Fixed undefined behavior in BASISU_OFFSETOF
This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
#define BASISU_ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
|
||||
#define BASISU_NO_EQUALS_OR_COPY_CONSTRUCT(x) x(const x &) = delete; x& operator= (const x &) = delete;
|
||||
#define BASISU_ASSUME(x) static_assert(x, #x);
|
||||
#define BASISU_OFFSETOF(s, m) (uint32_t)(intptr_t)(&((s *)(0))->m)
|
||||
#define BASISU_OFFSETOF(s, m) offsetof(s, m)
|
||||
#define BASISU_STRINGIZE(x) #x
|
||||
#define BASISU_STRINGIZE2(x) BASISU_STRINGIZE(x)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user