Go to the documentation of this file.
23 static inline void MemCpyT(T *destination,
const T *source,
size_t num = 1)
25 memcpy(destination, source, num *
sizeof(T));
36 static inline void MemMoveT(T *destination,
const T *source,
size_t num = 1)
38 memmove(destination, source, num *
sizeof(T));
49 static inline void MemSetT(T *ptr,
byte value,
size_t num = 1)
51 memset(ptr, value, num *
sizeof(T));
63 static inline int MemCmpT(
const T *ptr1,
const T *ptr2,
size_t num = 1)
65 return memcmp(ptr1, ptr2, num *
sizeof(T));
79 assert(ptr1 !=
nullptr && ptr2 !=
nullptr);
84 }
while (++ptr1 < --ptr2);
96 assert(ptr !=
nullptr);
static void MemReverseT(T *ptr1, T *ptr2)
Type safe memory reverse operation.
static void MemCpyT(T *destination, const T *source, size_t num=1)
Type-safe version of memcpy().
static void MemSetT(T *ptr, byte value, size_t num=1)
Type-safe version of memset().
static void Swap(T &a, T &b)
Type safe swap operation.
static int MemCmpT(const T *ptr1, const T *ptr2, size_t num=1)
Type-safe version of memcmp().
static void MemMoveT(T *destination, const T *source, size_t num=1)
Type-safe version of memmove().