diff options
author | skidd13 <skidd13@openttd.org> | 2008-06-22 15:21:51 +0000 |
---|---|---|
committer | skidd13 <skidd13@openttd.org> | 2008-06-22 15:21:51 +0000 |
commit | 640e5478862e3b83d85db6332e0d82a45a95e4ed (patch) | |
tree | 8904cbdb49b1373360cba22af59cfdea4811c6de /src/core/alloc_func.hpp | |
parent | 31b002dab0cb1bcbc00c9982a72e2cd948f74de5 (diff) | |
download | openttd-640e5478862e3b83d85db6332e0d82a45a95e4ed.tar.xz |
(svn r13606) -Codechange: use "static FORCEINLINE" where possible as default for core functions (big functions use just inline instead)
Diffstat (limited to 'src/core/alloc_func.hpp')
-rw-r--r-- | src/core/alloc_func.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/core/alloc_func.hpp b/src/core/alloc_func.hpp index ec30ffb6e..45c0036d9 100644 --- a/src/core/alloc_func.hpp +++ b/src/core/alloc_func.hpp @@ -24,7 +24,8 @@ void NORETURN ReallocError(size_t size); * @param num_elements the number of elements to allocate of the given type. * @return NULL when num_elements == 0, non-NULL otherwise. */ -template <typename T> FORCEINLINE T* MallocT(size_t num_elements) +template <typename T> +static FORCEINLINE T *MallocT(size_t num_elements) { /* * MorphOS cannot handle 0 elements allocations, or rather that always @@ -48,7 +49,8 @@ template <typename T> FORCEINLINE T* MallocT(size_t num_elements) * @param num_elements the number of elements to allocate of the given type. * @return NULL when num_elements == 0, non-NULL otherwise. */ -template <typename T> FORCEINLINE T* CallocT(size_t num_elements) +template <typename T> +static FORCEINLINE T *CallocT(size_t num_elements) { /* * MorphOS cannot handle 0 elements allocations, or rather that always @@ -73,7 +75,8 @@ template <typename T> FORCEINLINE T* CallocT(size_t num_elements) * @param num_elements the number of elements to allocate of the given type. * @return NULL when num_elements == 0, non-NULL otherwise. */ -template <typename T> FORCEINLINE T* ReallocT(T *t_ptr, size_t num_elements) +template <typename T> +FORCEINLINE T *ReallocT(T *t_ptr, size_t num_elements) { /* * MorphOS cannot handle 0 elements allocations, or rather that always |