(svn r13606) -Codechange: use "static FORCEINLINE" where possible as default for core functions (big functions use just inline instead)

This commit is contained in:
skidd13
2008-06-22 15:21:51 +00:00
parent 31b002dab0
commit 640e547886
10 changed files with 95 additions and 72 deletions

View File

@@ -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