diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-24 23:48:30 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-03-24 23:48:30 +0100 |
commit | 5cdf11d2f352cd51e5f6facb20deadd8629f68c9 (patch) | |
tree | c2c60f74754dec70f5d49a41f778ce928dfc7f57 /compat/util.hpp | |
parent | d903095d973922761071ea675f380f5c4c3cf2ad (diff) |
compat/util: add define for never_inline
Diffstat (limited to 'compat/util.hpp')
-rw-r--r-- | compat/util.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compat/util.hpp b/compat/util.hpp index 25640483..9439271f 100644 --- a/compat/util.hpp +++ b/compat/util.hpp @@ -67,3 +67,11 @@ auto qptr(xs... args) } template<typename t> using qshared = QSharedPointer<t>; + +#if defined _MSC_VER +# define OTR_NEVER_INLINE __declspec(noinline) +#elif defined __GNUG__ +# define OTR_NEVER_INLINE __attribute__((noinline)) +#else +# define OTR_NEVER_INLINE +#endif |