diff options
author | smatz <smatz@openttd.org> | 2009-05-19 08:21:37 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-19 08:21:37 +0000 |
commit | 3bd52accd9c12f828bd53d247aa952b85d3e36ce (patch) | |
tree | 05e15ab1346eeb04c0ddc5d30b73b7e118248419 /src | |
parent | 70aab8bf0487ef506afbeaa6cb8e46309387df84 (diff) | |
download | openttd-3bd52accd9c12f828bd53d247aa952b85d3e36ce.tar.xz |
(svn r16356) -Codechange: use 'size_t' instead of 'uint' as parameter of functions in mem_func.hpp
Diffstat (limited to 'src')
-rw-r--r-- | src/core/mem_func.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/mem_func.hpp b/src/core/mem_func.hpp index 04248e947..d0eb6154f 100644 --- a/src/core/mem_func.hpp +++ b/src/core/mem_func.hpp @@ -16,7 +16,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, uint num = 1) +static FORCEINLINE void MemCpyT(T *destination, const T *source, size_t num = 1) { memcpy(destination, source, num * sizeof(T)); } @@ -29,7 +29,7 @@ static FORCEINLINE void MemCpyT(T *destination, const T *source, uint 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, uint num = 1) +static FORCEINLINE void MemMoveT(T *destination, const T *source, size_t num = 1) { memmove(destination, source, num * sizeof(T)); } @@ -42,7 +42,7 @@ static FORCEINLINE void MemMoveT(T *destination, const T *source, uint 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, uint num = 1) +static FORCEINLINE void MemSetT(T *ptr, byte value, size_t num = 1) { memset(ptr, value, num * sizeof(T)); } @@ -56,7 +56,7 @@ static FORCEINLINE void MemSetT(T *ptr, byte value, uint 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, uint num = 1) +static FORCEINLINE int MemCmpT(const T *ptr1, const T *ptr2, size_t num = 1) { return memcmp(ptr1, ptr2, num * sizeof(T)); } @@ -87,7 +87,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, uint num) +static FORCEINLINE void MemReverseT(T *ptr, size_t num) { assert(ptr != NULL); |