diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index 000813b6..0e53fb03 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -4290,7 +4290,7 @@ static bool FindMemoryPreferences( //////////////////////////////////////////////////////////////////////////////// // Memory allocation -static void* VmaMalloc(const VkAllocationCallbacks* pAllocationCallbacks, size_t size, size_t alignment) +static inline void* VmaMalloc(const VkAllocationCallbacks* pAllocationCallbacks, size_t size, size_t alignment) { void* result = VMA_NULL; if ((pAllocationCallbacks != VMA_NULL) && @@ -4310,7 +4310,7 @@ static void* VmaMalloc(const VkAllocationCallbacks* pAllocationCallbacks, size_t return result; } -static void VmaFree(const VkAllocationCallbacks* pAllocationCallbacks, void* ptr) +static inline void VmaFree(const VkAllocationCallbacks* pAllocationCallbacks, void* ptr) { if ((pAllocationCallbacks != VMA_NULL) && (pAllocationCallbacks->pfnFree != VMA_NULL)) @@ -10779,12 +10779,12 @@ struct VmaAllocator_T #ifndef _VMA_MEMORY_FUNCTIONS -static void* VmaMalloc(VmaAllocator hAllocator, size_t size, size_t alignment) +static inline void* VmaMalloc(VmaAllocator hAllocator, size_t size, size_t alignment) { return VmaMalloc(&hAllocator->m_AllocationCallbacks, size, alignment); } -static void VmaFree(VmaAllocator hAllocator, void* ptr) +static inline void VmaFree(VmaAllocator hAllocator, void* ptr) { VmaFree(&hAllocator->m_AllocationCallbacks, ptr); }