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) #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);
} }