Correctly handle VMA_STATS_STRING_ENABLED define and undefine methods not being used.
diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h
index 6d57532..30181f2 100644
--- a/src/vk_mem_alloc.h
+++ b/src/vk_mem_alloc.h
@@ -1960,7 +1960,9 @@
VmaAllocator allocator,
VmaStats* pStats);
+#ifndef VMA_STATS_STRING_ENABLED
#define VMA_STATS_STRING_ENABLED 1
+#endif
#if VMA_STATS_STRING_ENABLED
@@ -3561,6 +3563,8 @@
return pStr == VMA_NULL || *pStr == '\0';
}
+#if VMA_STATS_STRING_ENABLED
+
static const char* VmaAlgorithmToStr(uint32_t algorithm)
{
switch(algorithm)
@@ -3577,6 +3581,8 @@
}
}
+#endif // #if VMA_STATS_STRING_ENABLED
+
#ifndef VMA_SORT
template<typename Iterator, typename Compare>