From 2f319213e9df33403815c38ae617e9a87ec22d95 Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Thu, 9 Sep 2021 13:35:16 +0200 Subject: ZEN_INLINE implementation for all supported toolchains --- zencore/include/zencore/zencore.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'zencore/include') diff --git a/zencore/include/zencore/zencore.h b/zencore/include/zencore/zencore.h index 87e09d014..73446b447 100644 --- a/zencore/include/zencore/zencore.h +++ b/zencore/include/zencore/zencore.h @@ -141,7 +141,12 @@ char (&ZenArrayCountHelper(const T (&)[N]))[N + 1]; ////////////////////////////////////////////////////////////////////////// -#define ZEN_NOINLINE __declspec(noinline) +#if ZEN_COMPILER_MSC +# define ZEN_NOINLINE __declspec(noinline) +#else +# define ZEN_NOINLINE __attribute__((noinline)) +#endif + #define ZEN_UNUSED(...) ((void)__VA_ARGS__) #define ZEN_NOT_IMPLEMENTED(...) ZEN_ASSERT(false) #define ZENCORE_API // Placeholder to allow DLL configs in the future -- cgit v1.2.3