From 636885113d3b95ca7243d49be637a546c94060a2 Mon Sep 17 00:00:00 2001 From: Jan Kuhlmann <33833587+M2-TE@users.noreply.github.com> Date: Fri, 24 Oct 2025 10:53:58 +0200 Subject: [PATCH] mark VmaMalloc and VmaFree as static inline --- include/vk_mem_alloc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); }