Make vma_aligned_alloc() functions static

This commit is contained in:
Frank Richter 2020-08-24 00:02:35 +02:00
parent 21936114ff
commit 2dc44c1d9d

View File

@ -4057,7 +4057,7 @@ remove them if not needed.
#if defined(__ANDROID_API__) && (__ANDROID_API__ < 16)
#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*)
if(alignment < sizeof(void*))
@ -4074,7 +4074,7 @@ void *vma_aligned_alloc(size_t alignment, size_t size)
#include <AvailabilityMacros.h>
#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 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;
}
#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);
}
#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);
}