From 083532cf3a4b9ee6612ca96ff4218cdc9b1eb803 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Mon, 4 Jun 2018 14:12:15 +0200 Subject: [PATCH] Removed #include for aligned_alloc(). Based on #28 by @jbeich --- src/vk_mem_alloc.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h index ebe3a02..67ed47a 100644 --- a/src/vk_mem_alloc.h +++ b/src/vk_mem_alloc.h @@ -2257,10 +2257,6 @@ remove them if not needed. #include // for std::mutex #include // for std::atomic -#if !defined(_WIN32) && !defined(__APPLE__) - #include // for aligned_alloc() -#endif - #ifndef VMA_NULL // Value used as null pointer. Define it to e.g.: nullptr, NULL, 0, (void*)0. #define VMA_NULL nullptr @@ -2283,6 +2279,11 @@ void *aligned_alloc(size_t alignment, size_t size) } #endif +// If your compiler is not compatible with C++11 and definition of +// aligned_alloc() function is missing, uncommeting following line may help: + +//#include + // Normal assert to check for programmer's errors, especially in Debug configuration. #ifndef VMA_ASSERT #ifdef _DEBUG