Skip to content

Commit 64d2b5c

Browse files
committed
Added inline to fix compilation in Clang 21
See GPUOpen-LibrariesAndSDKs#513, GPUOpen-LibrariesAndSDKs#514
1 parent 9c711ee commit 64d2b5c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/vk_mem_alloc.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4290,7 +4290,7 @@ static bool FindMemoryPreferences(
42904290
////////////////////////////////////////////////////////////////////////////////
42914291
// Memory allocation
42924292

4293-
static void* VmaMalloc(const VkAllocationCallbacks* pAllocationCallbacks, size_t size, size_t alignment)
4293+
static inline void* VmaMalloc(const VkAllocationCallbacks* pAllocationCallbacks, size_t size, size_t alignment)
42944294
{
42954295
void* result = VMA_NULL;
42964296
if ((pAllocationCallbacks != VMA_NULL) &&
@@ -4310,7 +4310,7 @@ static void* VmaMalloc(const VkAllocationCallbacks* pAllocationCallbacks, size_t
43104310
return result;
43114311
}
43124312

4313-
static void VmaFree(const VkAllocationCallbacks* pAllocationCallbacks, void* ptr)
4313+
static inline void VmaFree(const VkAllocationCallbacks* pAllocationCallbacks, void* ptr)
43144314
{
43154315
if ((pAllocationCallbacks != VMA_NULL) &&
43164316
(pAllocationCallbacks->pfnFree != VMA_NULL))
@@ -10779,12 +10779,12 @@ struct VmaAllocator_T
1077910779

1078010780

1078110781
#ifndef _VMA_MEMORY_FUNCTIONS
10782-
static void* VmaMalloc(VmaAllocator hAllocator, size_t size, size_t alignment)
10782+
static inline void* VmaMalloc(VmaAllocator hAllocator, size_t size, size_t alignment)
1078310783
{
1078410784
return VmaMalloc(&hAllocator->m_AllocationCallbacks, size, alignment);
1078510785
}
1078610786

10787-
static void VmaFree(VmaAllocator hAllocator, void* ptr)
10787+
static inline void VmaFree(VmaAllocator hAllocator, void* ptr)
1078810788
{
1078910789
VmaFree(&hAllocator->m_AllocationCallbacks, ptr);
1079010790
}

0 commit comments

Comments
 (0)