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/mem_func.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/mem_func.hpp')
-rw-r--r-- | src/core/mem_func.hpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/mem_func.hpp b/src/core/mem_func.hpp index 42e7b42f4..687871164 100644 --- a/src/core/mem_func.hpp +++ b/src/core/mem_func.hpp @@ -22,7 +22,7 @@ * @param num number of items to be copied. (!not number of bytes!) */ template <typename T> -static FORCEINLINE void MemCpyT(T *destination, const T *source, size_t num = 1) +static inline void MemCpyT(T *destination, const T *source, size_t num = 1) { memcpy(destination, source, num * sizeof(T)); } @@ -35,7 +35,7 @@ static FORCEINLINE void MemCpyT(T *destination, const T *source, size_t num = 1) * @param num number of items to be copied. (!not number of bytes!) */ template <typename T> -static FORCEINLINE void MemMoveT(T *destination, const T *source, size_t num = 1) +static inline void MemMoveT(T *destination, const T *source, size_t num = 1) { memmove(destination, source, num * sizeof(T)); } @@ -48,7 +48,7 @@ static FORCEINLINE void MemMoveT(T *destination, const T *source, size_t num = 1 * @param num number of items to be set (!not number of bytes!) */ template <typename T> -static FORCEINLINE void MemSetT(T *ptr, byte value, size_t num = 1) +static inline void MemSetT(T *ptr, byte value, size_t num = 1) { memset(ptr, value, num * sizeof(T)); } @@ -62,7 +62,7 @@ static FORCEINLINE void MemSetT(T *ptr, byte value, size_t num = 1) * @return an int value indicating the relationship between the content of the two buffers */ template <typename T> -static FORCEINLINE int MemCmpT(const T *ptr1, const T *ptr2, size_t num = 1) +static inline int MemCmpT(const T *ptr1, const T *ptr2, size_t num = 1) { return memcmp(ptr1, ptr2, num * sizeof(T)); } @@ -76,7 +76,7 @@ static FORCEINLINE int MemCmpT(const T *ptr1, const T *ptr2, size_t num = 1) * @param ptr2 End-pointer to the block of memory. */ template <typename T> -static FORCEINLINE void MemReverseT(T *ptr1, T *ptr2) +static inline void MemReverseT(T *ptr1, T *ptr2) { assert(ptr1 != NULL && ptr2 != NULL); assert(ptr1 < ptr2); @@ -93,7 +93,7 @@ static FORCEINLINE void MemReverseT(T *ptr1, T *ptr2) * @param num The number of items we want to reverse. */ template <typename T> -static FORCEINLINE void MemReverseT(T *ptr, size_t num) +static inline void MemReverseT(T *ptr, size_t num) { assert(ptr != NULL); |