diff options
author | Eric Engestrom <[email protected]> | 2017-01-24 18:07:05 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-01-27 16:52:23 +0000 |
commit | a98b3a0872f9c542e6db75d17b7875a3f0374a14 (patch) | |
tree | 8391e93696ff1ae773abc062253e3eabd2ab01f6 /include/EGL/eglplatform.h | |
parent | 06842585df830a710ec59c2385bcef5badd8ecc6 (diff) |
egl: update headers from registry
Khronos introduced a new macro (suggested by Google) to avoid using
C-style casts in C++ code, as those generate warnings.
Khronos Bugzilla: https://cvs.khronos.org/bugzilla/show_bug.cgi?id=16113
Signed-off-by: Eric Engestrom <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'include/EGL/eglplatform.h')
-rw-r--r-- | include/EGL/eglplatform.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/EGL/eglplatform.h b/include/EGL/eglplatform.h index b376e642822..f045d009c03 100644 --- a/include/EGL/eglplatform.h +++ b/include/EGL/eglplatform.h @@ -2,7 +2,7 @@ #define __eglplatform_h_ /* -** Copyright (c) 2007-2013 The Khronos Group Inc. +** Copyright (c) 2007-2016 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the @@ -150,4 +150,12 @@ typedef EGLNativeWindowType NativeWindowType; */ typedef khronos_int32_t EGLint; + +/* C++ / C typecast macros for special EGL handle values */ +#if defined(__cplusplus) +#define EGL_CAST(type, value) (static_cast<type>(value)) +#else +#define EGL_CAST(type, value) ((type) (value)) +#endif + #endif /* __eglplatform_h */ |