diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-09 17:14:02 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2018-01-10 03:18:58 +0100 |
commit | 7d101a1c2827b5e7a373fb0d0a68099fb692e55a (patch) | |
tree | 3489a2988806a02a9ef31760116de104f94582c6 /compat/macros.hpp | |
parent | 674c8a9f1a42b36940551a6ebaf953ad96d379d0 (diff) |
many: spring cleanup
Diffstat (limited to 'compat/macros.hpp')
-rw-r--r-- | compat/macros.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compat/macros.hpp b/compat/macros.hpp index 8f807bf0..ed0bd8da 100644 --- a/compat/macros.hpp +++ b/compat/macros.hpp @@ -45,18 +45,24 @@ #ifdef Q_CREATOR_RUN # define warn_result_unused -#elif defined(_MSC_VER) +#elif defined _MSC_VER # define warn_result_unused _Check_return_ #else # define warn_result_unused __attribute__((warn_unused_result)) #endif -#if defined(__GNUG__) +#if defined __GNUG__ # define unused(t, i) t __attribute__((unused)) i #else # define unused(t, i) t #endif +#if defined _MSC_VER +# define aligned_struct(x) struct __declspec(align(x)) +#else +# define aligned_struct(x) struct __attribute__((__aligned__(x))) +#endif + #if defined __GNUC__ # define likely(x) __builtin_expect(!!(x),1) # define unlikely(x) __builtin_expect(!!(x),0) |