mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 11:00:11 +01:00
egl: turn a couple asserts static (compile-time)
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
parent
8af1b540c5
commit
49dad1aafd
1 changed files with 4 additions and 3 deletions
|
|
@ -38,6 +38,7 @@
|
|||
#include <assert.h>
|
||||
#include "c99_compat.h"
|
||||
|
||||
#include "eglcompiler.h"
|
||||
#include "eglconfig.h"
|
||||
#include "egldisplay.h"
|
||||
#include "eglcurrent.h"
|
||||
|
|
@ -598,14 +599,14 @@ _eglCompareConfigs(const _EGLConfig *conf1, const _EGLConfig *conf2,
|
|||
return 0;
|
||||
|
||||
/* the enum values have the desired ordering */
|
||||
assert(EGL_NONE < EGL_SLOW_CONFIG);
|
||||
assert(EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG);
|
||||
STATIC_ASSERT(EGL_NONE < EGL_SLOW_CONFIG);
|
||||
STATIC_ASSERT(EGL_SLOW_CONFIG < EGL_NON_CONFORMANT_CONFIG);
|
||||
val1 = conf1->ConfigCaveat - conf2->ConfigCaveat;
|
||||
if (val1)
|
||||
return val1;
|
||||
|
||||
/* the enum values have the desired ordering */
|
||||
assert(EGL_RGB_BUFFER < EGL_LUMINANCE_BUFFER);
|
||||
STATIC_ASSERT(EGL_RGB_BUFFER < EGL_LUMINANCE_BUFFER);
|
||||
val1 = conf1->ColorBufferType - conf2->ColorBufferType;
|
||||
if (val1)
|
||||
return val1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue