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.
This commit is contained in:
parent
bc2ee93758
commit
b64850e732
|
@ -58,12 +58,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef _FORCE_INLINE_
|
#ifndef _FORCE_INLINE_
|
||||||
#ifdef DEBUG_ENABLED
|
|
||||||
#define _FORCE_INLINE_ inline
|
|
||||||
#else
|
|
||||||
#define _FORCE_INLINE_ _ALWAYS_INLINE_
|
#define _FORCE_INLINE_ _ALWAYS_INLINE_
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
//custom, gcc-safe offsetof, because gcc complains a lot.
|
//custom, gcc-safe offsetof, because gcc complains a lot.
|
||||||
template <class T>
|
template <class T>
|
||||||
|
@ -266,7 +262,7 @@ static inline uint64_t BSWAP64(uint64_t x) {
|
||||||
template <class T>
|
template <class T>
|
||||||
struct Comparator {
|
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();
|
void _global_lock();
|
||||||
|
|
Loading…
Reference in New Issue