summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/prog_print.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-11-29 07:36:50 -0700
committerBrian Paul <[email protected]>2011-11-30 06:57:37 -0700
commit529fa775293ddd24e389f2ea6a43bd18f01a1609 (patch)
tree818043cd03c947180adb3f4e8ef84db20a691681 /src/mesa/program/prog_print.c
parentc67d9cfd9d5d04b5b32170616f75b34e0192304b (diff)
mesa: use Elements() macro in program printing code
Diffstat (limited to 'src/mesa/program/prog_print.c')
-rw-r--r--src/mesa/program/prog_print.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/program/prog_print.c b/src/mesa/program/prog_print.c
index f2b91979f7d..e9bf3aadf37 100644
--- a/src/mesa/program/prog_print.c
+++ b/src/mesa/program/prog_print.c
@@ -157,11 +157,11 @@ arb_input_attrib_string(GLint index, GLenum progType)
assert(strcmp(vertAttribs[VERT_ATTRIB_GENERIC15], "vertex.attrib[15]") == 0);
if (progType == GL_VERTEX_PROGRAM_ARB) {
- assert(index < sizeof(vertAttribs) / sizeof(vertAttribs[0]));
+ assert(index < Elements(vertAttribs));
return vertAttribs[index];
}
else {
- assert(index < sizeof(fragAttribs) / sizeof(fragAttribs[0]));
+ assert(index < Elements(fragAttribs));
return fragAttribs[index];
}
}
@@ -246,11 +246,11 @@ arb_output_attrib_string(GLint index, GLenum progType)
};
if (progType == GL_VERTEX_PROGRAM_ARB) {
- assert(index < sizeof(vertResults) / sizeof(vertResults[0]));
+ assert(index < Elements(vertResults));
return vertResults[index];
}
else {
- assert(index < sizeof(fragResults) / sizeof(fragResults[0]));
+ assert(index < Elements(fragResults));
return fragResults[index];
}
}