From b64850e732aed14958061c40ae5f78cf6be692b6 Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam Date: Fri, 27 Jul 2018 14:30:49 +0200 Subject: [PATCH] Make _ALWAYS_INLINE_ and _FORCE_INLINE_ equivalent _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case. --- core/typedefs.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/typedefs.h b/core/typedefs.h index 4f3c260c2cc..e1eb0ac8503 100644 --- a/core/typedefs.h +++ b/core/typedefs.h @@ -58,12 +58,8 @@ #endif #ifndef _FORCE_INLINE_ -#ifdef DEBUG_ENABLED -#define _FORCE_INLINE_ inline -#else #define _FORCE_INLINE_ _ALWAYS_INLINE_ #endif -#endif //custom, gcc-safe offsetof, because gcc complains a lot. template @@ -266,7 +262,7 @@ static inline uint64_t BSWAP64(uint64_t x) { template struct Comparator { - inline bool operator()(const T &p_a, const T &p_b) const { return (p_a < p_b); } + _ALWAYS_INLINE_ bool operator()(const T &p_a, const T &p_b) const { return (p_a < p_b); } }; void _global_lock();