Skip to content

Commit 38627f4

Browse files
Added VMA_LEN_IF_NOT_NULL decoration to the new functions vmaCopyMemoryToAllocation, vmaCopyAllocationToMemory
Fixes #406 - thanks @qbojj
1 parent a13c193 commit 38627f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/vk_mem_alloc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2204,7 +2204,7 @@ Do not pass allocation's offset within device memory block this parameter!
22042204
*/
22052205
VMA_CALL_PRE VkResult VMA_CALL_POST vmaCopyMemoryToAllocation(
22062206
VmaAllocator VMA_NOT_NULL allocator,
2207-
const void* VMA_NOT_NULL pSrcHostPointer,
2207+
const void* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL(size) pSrcHostPointer,
22082208
VmaAllocation VMA_NOT_NULL dstAllocation,
22092209
VkDeviceSize dstAllocationLocalOffset,
22102210
VkDeviceSize size);
@@ -2234,7 +2234,7 @@ VMA_CALL_PRE VkResult VMA_CALL_POST vmaCopyAllocationToMemory(
22342234
VmaAllocator VMA_NOT_NULL allocator,
22352235
VmaAllocation VMA_NOT_NULL srcAllocation,
22362236
VkDeviceSize srcAllocationLocalOffset,
2237-
void* VMA_NOT_NULL pDstHostPointer,
2237+
void* VMA_NOT_NULL VMA_LEN_IF_NOT_NULL(size) pDstHostPointer,
22382238
VkDeviceSize size);
22392239

22402240
/** \brief Checks magic number in margins around all allocations in given memory types (in both default and custom pools) in search for corruptions.

0 commit comments

Comments
 (0)