diff options
author | truebrain <truebrain@openttd.org> | 2011-12-20 17:57:56 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-20 17:57:56 +0000 |
commit | 1c9bec19993417b1f3b240f2bdb0745aa26c0cb3 (patch) | |
tree | d09407cc962ee87ac1bbbbc60951cad74c6b1db7 /src/core/alloc_type.hpp | |
parent | 7a38642a1c83531a65907ae784bc03a82d35132a (diff) | |
download | openttd-1c9bec19993417b1f3b240f2bdb0745aa26c0cb3.tar.xz |
(svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC)
Diffstat (limited to 'src/core/alloc_type.hpp')
-rw-r--r-- | src/core/alloc_type.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/core/alloc_type.hpp b/src/core/alloc_type.hpp index 9cac62758..6caaf916a 100644 --- a/src/core/alloc_type.hpp +++ b/src/core/alloc_type.hpp @@ -48,7 +48,7 @@ struct SmallStackSafeStackAlloc { * Gets a pointer to the data stored in this wrapper. * @return the pointer. */ - FORCEINLINE operator T *() + inline operator T *() { return data; } @@ -57,7 +57,7 @@ struct SmallStackSafeStackAlloc { * Gets a pointer to the data stored in this wrapper. * @return the pointer. */ - FORCEINLINE T *operator -> () + inline T *operator -> () { return data; } @@ -67,7 +67,7 @@ struct SmallStackSafeStackAlloc { * @note needed because endof does not work properly for pointers. * @return the 'endof' pointer. */ - FORCEINLINE T *EndOf() + inline T *EndOf() { #if !defined(__NDS__) return endof(data); @@ -137,7 +137,7 @@ public: * Get the currently allocated buffer. * @return the buffer */ - FORCEINLINE const T *GetBuffer() const + inline const T *GetBuffer() const { return this->buffer; } @@ -158,26 +158,26 @@ public: * @param size the amount of bytes to allocate. * @return the given amounts of bytes zeroed. */ - FORCEINLINE void *operator new(size_t size) { return CallocT<byte>(size); } + inline void *operator new(size_t size) { return CallocT<byte>(size); } /** * Memory allocator for an array of class instances. * @param size the amount of bytes to allocate. * @return the given amounts of bytes zeroed. */ - FORCEINLINE void *operator new[](size_t size) { return CallocT<byte>(size); } + inline void *operator new[](size_t size) { return CallocT<byte>(size); } /** * Memory release for a single class instance. * @param ptr the memory to free. */ - FORCEINLINE void operator delete(void *ptr) { free(ptr); } + inline void operator delete(void *ptr) { free(ptr); } /** * Memory release for an array of class instances. * @param ptr the memory to free. */ - FORCEINLINE void operator delete[](void *ptr) { free(ptr); } + inline void operator delete[](void *ptr) { free(ptr); } }; #endif /* ALLOC_TYPE_HPP */ |