summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2018-10-02 13:53:53 -0300
committerJuan Linietsky <reduzio@gmail.com>2018-10-02 13:54:15 -0300
commit75c29879b0c0b100415b2abd1992994656d06aec (patch)
tree6716860f0e81c0be225a9ea7592004302ee2840f /core
parentff1794a7a080e30cff4dd1efb99289ab1f4f267d (diff)
Disable forced inline when building in debug.
Diffstat (limited to 'core')
-rw-r--r--core/typedefs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/typedefs.h b/core/typedefs.h
index 2b26bf08f7..5c15da9c2d 100644
--- a/core/typedefs.h
+++ b/core/typedefs.h
@@ -44,6 +44,7 @@
#define _MKSTR(m_x) _STR(m_x)
#endif
+//should always inline no matter what
#ifndef _ALWAYS_INLINE_
#if defined(__GNUC__) && (__GNUC__ >= 4)
@@ -58,10 +59,17 @@
#endif
+//should always inline, except in some cases because it makes debugging harder
#ifndef _FORCE_INLINE_
+
+#ifdef DISABLE_FORCED_INLINE
+#define _FORCE_INLINE_ inline
+#else
#define _FORCE_INLINE_ _ALWAYS_INLINE_
#endif
+#endif
+
//custom, gcc-safe offsetof, because gcc complains a lot.
template <class T>
T *_nullptr() {