Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2015-08-12 23:17:27 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2015-10-10 18:35:30 +0300
commitb0986091868f928b5e09c1a7f51654e102bf5f54 (patch)
tree40d5b2f597b27dc0c92dd8a44dd85043a1b4e726 /source/blender/blenlib/BLI_alloca.h
parent2a97c17549a858ce1beac22777bc0d2f3a535eb8 (diff)
Fix various compiler warnings.
Diffstat (limited to 'source/blender/blenlib/BLI_alloca.h')
-rw-r--r--source/blender/blenlib/BLI_alloca.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_alloca.h b/source/blender/blenlib/BLI_alloca.h
index fd814940624..b44e6c66d2a 100644
--- a/source/blender/blenlib/BLI_alloca.h
+++ b/source/blender/blenlib/BLI_alloca.h
@@ -34,8 +34,13 @@
#endif
#if defined(__GNUC__) || defined(__clang__)
+#if defined(__cplusplus) && (__cplusplus > 199711L)
+#define BLI_array_alloca(arr, realsize) \
+ (decltype(arr))alloca(sizeof(*arr) * (realsize))
+#else
#define BLI_array_alloca(arr, realsize) \
(typeof(arr))alloca(sizeof(*arr) * (realsize))
+#endif
#else
#define BLI_array_alloca(arr, realsize) \
alloca(sizeof(*arr) * (realsize))