mirror of
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
synced 2024-11-05 12:20:07 +00:00
Make vma_aligned_alloc() functions static
This commit is contained in:
parent
21936114ff
commit
2dc44c1d9d
@ -4057,7 +4057,7 @@ remove them if not needed.
|
|||||||
|
|
||||||
#if defined(__ANDROID_API__) && (__ANDROID_API__ < 16)
|
#if defined(__ANDROID_API__) && (__ANDROID_API__ < 16)
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
void *vma_aligned_alloc(size_t alignment, size_t size)
|
static void* vma_aligned_alloc(size_t alignment, size_t size)
|
||||||
{
|
{
|
||||||
// alignment must be >= sizeof(void*)
|
// alignment must be >= sizeof(void*)
|
||||||
if(alignment < sizeof(void*))
|
if(alignment < sizeof(void*))
|
||||||
@ -4074,7 +4074,7 @@ void *vma_aligned_alloc(size_t alignment, size_t size)
|
|||||||
#include <AvailabilityMacros.h>
|
#include <AvailabilityMacros.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void *vma_aligned_alloc(size_t alignment, size_t size)
|
static void* vma_aligned_alloc(size_t alignment, size_t size)
|
||||||
{
|
{
|
||||||
#if defined(__APPLE__) && (defined(MAC_OS_X_VERSION_10_16) || defined(__IPHONE_14_0))
|
#if defined(__APPLE__) && (defined(MAC_OS_X_VERSION_10_16) || defined(__IPHONE_14_0))
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_16 || __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_16 || __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0
|
||||||
@ -4100,12 +4100,12 @@ void *vma_aligned_alloc(size_t alignment, size_t size)
|
|||||||
return VMA_NULL;
|
return VMA_NULL;
|
||||||
}
|
}
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
void *vma_aligned_alloc(size_t alignment, size_t size)
|
static void* vma_aligned_alloc(size_t alignment, size_t size)
|
||||||
{
|
{
|
||||||
return _aligned_malloc(size, alignment);
|
return _aligned_malloc(size, alignment);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
void *vma_aligned_alloc(size_t alignment, size_t size)
|
static void* vma_aligned_alloc(size_t alignment, size_t size)
|
||||||
{
|
{
|
||||||
return aligned_alloc(alignment, size);
|
return aligned_alloc(alignment, size);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user