diff --git a/cpp/subprojects/common/include/mlrl/common/util/memory.hpp b/cpp/subprojects/common/include/mlrl/common/util/memory.hpp index 688bf786ac..e9241539b8 100644 --- a/cpp/subprojects/common/include/mlrl/common/util/memory.hpp +++ b/cpp/subprojects/common/include/mlrl/common/util/memory.hpp @@ -33,8 +33,8 @@ static inline constexpr T* allocateMemory(uint32 numElements, bool init = false) * @return A pointer to the reallocated memory */ template -static inline constexpr T* reallocateMemory(T* ptr, uint32 numElements) { - return (T*) realloc(ptr, numElements * sizeof(T)); +static inline constexpr T* reallocateMemory(T* array, uint32 numElements) { + return (T*) realloc(array, numElements * sizeof(T)); } /** @@ -44,8 +44,8 @@ static inline constexpr T* reallocateMemory(T* ptr, uint32 numElements) { * @param array A pointer to an array of template type `T` */ template -static inline constexpr void freeMemory(T* ptr) { - if (ptr) { - free(ptr); +static inline constexpr void freeMemory(T* array) { + if (array) { + free(array); } }