fix visual studio warning C4116
This commit is contained in:
parent
1d465751c6
commit
c867184094
@ -2691,6 +2691,8 @@ template<typename T> struct nk_helper<T,0>{enum {value = nk_alignof<T>::value};}
|
||||
template<typename T> struct nk_alignof{struct Big {T x; char c;}; enum {
|
||||
diff = sizeof(Big) - sizeof(T), value = nk_helper<Big, diff>::value};};
|
||||
#define NK_ALIGNOF(t) (nk_alignof<t>::value);
|
||||
#elif defined(_MSC_VER)
|
||||
#define NK_ALIGNOF(t) (__alignof(t))
|
||||
#else
|
||||
#define NK_ALIGNOF(t) ((char*)(&((struct {char c; t _h;}*)0)->_h) - (char*)0)
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user