Mesa (master): mesa/swrast: replace Elements() with ARRAY_SIZE()
Brian Paul
brianp at kemper.freedesktop.org
Mon Mar 2 16:02:50 UTC 2015
Module: Mesa
Branch: master
Commit: 16f7b7727569758a4df9c2bae3ca3a0de683960d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=16f7b7727569758a4df9c2bae3ca3a0de683960d
Author: Brian Paul <brianp at vmware.com>
Date: Sat Feb 28 08:57:20 2015 -0700
mesa/swrast: replace Elements() with ARRAY_SIZE()
Acked-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
src/mesa/swrast/s_points.c | 2 +-
src/mesa/swrast/s_texfetch.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c
index 52a7222..8180483 100644
--- a/src/mesa/swrast/s_points.c
+++ b/src/mesa/swrast/s_points.c
@@ -140,7 +140,7 @@ sprite_point(struct gl_context *ctx, const SWvertex *vert)
if (attr >= VARYING_SLOT_TEX0 && attr <= VARYING_SLOT_TEX7) {
/* a texcoord attribute */
const GLuint u = attr - VARYING_SLOT_TEX0;
- assert(u < Elements(ctx->Point.CoordReplace));
+ assert(u < ARRAY_SIZE(ctx->Point.CoordReplace));
if (ctx->Point.CoordReplace[u]) {
tCoords[numTcoords++] = attr;
diff --git a/src/mesa/swrast/s_texfetch.c b/src/mesa/swrast/s_texfetch.c
index 242f8a4..3c4ee15 100644
--- a/src/mesa/swrast/s_texfetch.c
+++ b/src/mesa/swrast/s_texfetch.c
@@ -573,7 +573,7 @@ set_fetch_functions(const struct gl_sampler_object *samp,
}
#endif
- STATIC_ASSERT(Elements(texfetch_funcs) == MESA_FORMAT_COUNT);
+ STATIC_ASSERT(ARRAY_SIZE(texfetch_funcs) == MESA_FORMAT_COUNT);
if (samp->sRGBDecode == GL_SKIP_DECODE_EXT &&
_mesa_get_format_color_encoding(format) == GL_SRGB) {
More information about the mesa-commit
mailing list