From e5ff2b94ff16a05d4c5928a85199291e2e7f234e Mon Sep 17 00:00:00 2001 From: Michal Krol Date: Thu, 19 May 2005 10:22:28 +0000 Subject: [PATCH] add static_assert macro --- src/mesa/shader/slang/slang_utility.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/shader/slang/slang_utility.h b/src/mesa/shader/slang/slang_utility.h index 6eb5369acd1..0240385e8d5 100644 --- a/src/mesa/shader/slang/slang_utility.h +++ b/src/mesa/shader/slang/slang_utility.h @@ -29,6 +29,8 @@ extern "C" { #endif +#define static_assert(expr) do { int _array[(expr) ? 1 : 0]; _array[0]; } while (0) + void slang_alloc_free (void *); void *slang_alloc_malloc (unsigned int); void *slang_alloc_realloc (void *, unsigned int, unsigned int); -- 2.30.2