Skip to content

Commit 3ee49f1

Browse files
committed
Fix undeclared identifier for Apple.
1 parent 65231e3 commit 3ee49f1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/vk_mem_alloc.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,6 +1839,11 @@ remove them if not needed.
18391839
#include <malloc.h> // for aligned_alloc()
18401840
#endif
18411841

1842+
#ifndef VMA_NULL
1843+
// Value used as null pointer. Define it to e.g.: nullptr, NULL, 0, (void*)0.
1844+
#define VMA_NULL nullptr
1845+
#endif
1846+
18421847
#if defined(__APPLE__)
18431848
#include <cstdlib>
18441849
void *aligned_alloc(size_t alignment, size_t size)
@@ -1875,11 +1880,6 @@ void *aligned_alloc(size_t alignment, size_t size)
18751880
#endif
18761881
#endif
18771882

1878-
#ifndef VMA_NULL
1879-
// Value used as null pointer. Define it to e.g.: nullptr, NULL, 0, (void*)0.
1880-
#define VMA_NULL nullptr
1881-
#endif
1882-
18831883
#ifndef VMA_ALIGN_OF
18841884
#define VMA_ALIGN_OF(type) (__alignof(type))
18851885
#endif

0 commit comments

Comments
 (0)