vulkan: use STATIC_ASSERT instead of static_assert

Following the spirit of commit 23d1799f, fixes compilation
warnings on Android build due to lack of C11 features.

Signed-off-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Edward O'Callaghan
2016-12-07 10:30:48 +11:00
parent e9f17e9fb0
commit a77426fd92
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -173,7 +173,7 @@ radv_clear_mask(uint32_t *inout_mask, uint32_t clear_mask)
__dword &= ~(1 << (b)))
#define typed_memcpy(dest, src, count) ({ \
static_assert(sizeof(*src) == sizeof(*dest), ""); \
STATIC_ASSERT(sizeof(*src) == sizeof(*dest)); \
memcpy((dest), (src), (count) * sizeof(*(src))); \
})
+1 -1
View File
@@ -38,7 +38,7 @@
#include <util/u_vector.h>
#define typed_memcpy(dest, src, count) ({ \
static_assert(sizeof(*src) == sizeof(*dest), ""); \
STATIC_ASSERT(sizeof(*src) == sizeof(*dest)); \
memcpy((dest), (src), (count) * sizeof(*(src))); \
})
+1 -1
View File
@@ -42,7 +42,7 @@
#include "wsi_common_queue.h"
#define typed_memcpy(dest, src, count) ({ \
static_assert(sizeof(*src) == sizeof(*dest), ""); \
STATIC_ASSERT(sizeof(*src) == sizeof(*dest)); \
memcpy((dest), (src), (count) * sizeof(*(src))); \
})