File diff r18781:e1de9a06f7cd → r18782:6453522c2154
src/core/alloc_func.hpp
Show inline comments
 
@@ -53,13 +53,13 @@ static inline void CheckAllocationConstr
 
 * @note the memory contains garbage data (i.e. possibly non-zero values).
 
 * @tparam T the type of the variable(s) to allocation.
 
 * @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>
 
static FORCEINLINE T *MallocT(size_t num_elements)
 
static inline T *MallocT(size_t num_elements)
 
{
 
	/*
 
	 * MorphOS cannot handle 0 elements allocations, or rather that always
 
	 * returns NULL. So we do that for *all* allocations, thus causing it
 
	 * to behave the same on all OSes.
 
	 */
 
@@ -81,13 +81,13 @@ static FORCEINLINE T *MallocT(size_t num
 
 * @note the memory contains all zero values.
 
 * @tparam T the type of the variable(s) to allocation.
 
 * @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>
 
static FORCEINLINE T *CallocT(size_t num_elements)
 
static inline T *CallocT(size_t num_elements)
 
{
 
	/*
 
	 * MorphOS cannot handle 0 elements allocations, or rather that always
 
	 * returns NULL. So we do that for *all* allocations, thus causing it
 
	 * to behave the same on all OSes.
 
	 */
 
@@ -107,13 +107,13 @@ static FORCEINLINE T *CallocT(size_t num
 
 * @tparam T the type of the variable(s) to allocation.
 
 * @param t_ptr the previous allocation to extend/shrink.
 
 * @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>
 
static FORCEINLINE T *ReallocT(T *t_ptr, size_t num_elements)
 
static inline T *ReallocT(T *t_ptr, size_t num_elements)
 
{
 
	/*
 
	 * MorphOS cannot handle 0 elements allocations, or rather that always
 
	 * returns NULL. So we do that for *all* allocations, thus causing it
 
	 * to behave the same on all OSes.
 
	 */