diff options
author | Brian Paul <[email protected]> | 2012-01-10 11:09:02 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-01-10 12:37:37 -0700 |
commit | 6bf5daf331f13ec9503615a2578247e72b7d2cbb (patch) | |
tree | 330ebba53381d9f2bd4c226d1675bf0fafc95758 /src/mesa | |
parent | f9b2d2fea586f772551abbb675970b71b2fdf8c9 (diff) |
mesa: use STATIC_ASSERT in a few more places
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/formats.c | 2 | ||||
-rw-r--r-- | src/mesa/main/shaderapi.c | 2 | ||||
-rw-r--r-- | src/mesa/main/shared.c | 2 | ||||
-rw-r--r-- | src/mesa/main/texstate.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index cca0014b178..96317dbf4d5 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -1951,7 +1951,7 @@ _mesa_test_formats(void) { GLuint i; - assert(Elements(format_info) == MESA_FORMAT_COUNT); + STATIC_ASSERT(Elements(format_info) == MESA_FORMAT_COUNT); for (i = 0; i < MESA_FORMAT_COUNT; i++) { const struct gl_format_info *info = _mesa_get_format_info(i); diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 52a9bd45254..9372d6decf6 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -923,7 +923,7 @@ validate_samplers(const struct gl_program *prog, char *errMsg) GLbitfield samplersUsed = prog->SamplersUsed; GLuint i; - assert(Elements(targetName) == NUM_TEXTURE_TARGETS); + STATIC_ASSERT(Elements(targetName) == NUM_TEXTURE_TARGETS); if (samplersUsed == 0x0) return GL_TRUE; diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c index 276fac149ed..c3e93b5a583 100644 --- a/src/mesa/main/shared.c +++ b/src/mesa/main/shared.c @@ -113,7 +113,7 @@ _mesa_alloc_shared_state(struct gl_context *ctx) GL_TEXTURE_2D, GL_TEXTURE_1D }; - assert(Elements(targets) == NUM_TEXTURE_TARGETS); + STATIC_ASSERT(Elements(targets) == NUM_TEXTURE_TARGETS); shared->DefaultTex[i] = ctx->Driver.NewTextureObject(ctx, 0, targets[i]); } diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 7cd285803d5..8e9537faefc 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -695,7 +695,7 @@ alloc_proxy_textures( struct gl_context *ctx ) }; GLint tgt; - ASSERT(Elements(targets) == NUM_TEXTURE_TARGETS); + STATIC_ASSERT(Elements(targets) == NUM_TEXTURE_TARGETS); for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++) { if (!(ctx->Texture.ProxyTex[tgt] |