aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2021-09-09 13:35:16 +0200
committerMartin Ridgers <[email protected]>2021-09-14 14:29:27 +0200
commit2f319213e9df33403815c38ae617e9a87ec22d95 (patch)
tree0a426a1872719083efcdc1fa8bcd9dc321b5772e /zencore/include
parentCorrect instrinsic include for POSIX platforms (diff)
downloadzen-2f319213e9df33403815c38ae617e9a87ec22d95.tar.xz
zen-2f319213e9df33403815c38ae617e9a87ec22d95.zip
ZEN_INLINE implementation for all supported toolchains
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/zencore.h7
1 files changed, 6 insertions, 1 deletions
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