From 9a2e2eccade234fd0e592a056740b0148e6e2fc0 Mon Sep 17 00:00:00 2001 From: Tobias Frisch <tfrisch@uni-koblenz.de> Date: Thu, 15 Jul 2021 09:44:49 +0200 Subject: [PATCH] [#93] Corrected types of integers to be included with stdint.h Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de> --- config/lib/vma/vma.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/config/lib/vma/vma.cpp b/config/lib/vma/vma.cpp index c21d5003..307c27f0 100644 --- a/config/lib/vma/vma.cpp +++ b/config/lib/vma/vma.cpp @@ -5,6 +5,7 @@ #ifndef _MSVC_LANG #ifdef __MINGW32__ +#include <stdint.h> #include <stdlib.h> class VmaMutex { @@ -32,20 +33,20 @@ T* custom_overestimate_malloc(size_t size) { void* custom_aligned_malloc(size_t alignment, size_t size) { if (alignment > 4) { - return custom_overestimate_malloc<u_int64_t>(size); + return custom_overestimate_malloc<uint64_t>(size); } else if (alignment > 2) { - return custom_overestimate_malloc<u_int32_t>(size); + return custom_overestimate_malloc<uint32_t>(size); } else if (alignment > 1) { - return custom_overestimate_malloc<u_int16_t>(size); + return custom_overestimate_malloc<uint16_t>(size); } else { - return custom_overestimate_malloc<u_int8_t>(size); + return custom_overestimate_malloc<uint8_t>(size); } } void custom_free(void *ptr) { - delete[] reinterpret_cast<u_int8_t*>(ptr); + delete[] reinterpret_cast<uint8_t*>(ptr); } #define VMA_SYSTEM_ALIGNED_MALLOC(size, alignment) (custom_aligned_malloc(alignment, size)) -- GitLab