Merge pull request #194 from danielkrupinski/master

Adjust VMA_MIN() and VMA_MAX() macros to work despite NOMINMAX being defined or not.
This commit is contained in:
Adam Sawicki 2021-09-21 17:48:48 +02:00 committed by GitHub
commit beb26af01c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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