diff options
author | Michal Krol <[email protected]> | 2005-05-19 10:22:28 +0000 |
---|---|---|
committer | Michal Krol <[email protected]> | 2005-05-19 10:22:28 +0000 |
commit | e5ff2b94ff16a05d4c5928a85199291e2e7f234e (patch) | |
tree | 2bb05eb01584ae55b74a06bc7dc7e0e705a1a5a5 /src/mesa/shader | |
parent | 216f89318ee455ec5e74f836184c1e55e8ec8a92 (diff) |
add static_assert macro
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/slang/slang_utility.h | 2 |
1 files changed, 2 insertions, 0 deletions
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);
|