From 2b87d57ffd621cff0598bffbbe37e71e42e23701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Krupi=C5=84ski?= Date: Mon, 20 Sep 2021 20:57:17 +0200 Subject: [PATCH] Adjust VMA_MIN() and VMA_MAX() macros to work despite NOMINMAX being defined or not. --- include/vk_mem_alloc.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/include/vk_mem_alloc.h b/include/vk_mem_alloc.h index 401b711..59af0e2 100644 --- a/include/vk_mem_alloc.h +++ b/include/vk_mem_alloc.h @@ -116,10 +116,6 @@ available through VmaAllocatorCreateInfo::pRecordSettings. #define VMA_RECORDING_ENABLED 0 #endif -#if !defined(NOMINMAX) && defined(VMA_IMPLEMENTATION) - #define NOMINMAX // For windows.h -#endif - #if defined(__ANDROID__) && defined(VK_NO_PROTOTYPES) && VMA_STATIC_VULKAN_FUNCTIONS extern PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr; extern PFN_vkGetDeviceProcAddr vkGetDeviceProcAddr; @@ -2382,11 +2378,11 @@ static void vma_aligned_free(void* VMA_NULLABLE ptr) #endif #ifndef VMA_MIN - #define VMA_MIN(v1, v2) (std::min((v1), (v2))) + #define VMA_MIN(v1, v2) ((std::min)((v1), (v2))) #endif #ifndef VMA_MAX - #define VMA_MAX(v1, v2) (std::max((v1), (v2))) + #define VMA_MAX(v1, v2) ((std::max)((v1), (v2))) #endif #ifndef VMA_SWAP