summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>2014-04-02 16:13:59 +0300
committerTapani Pälli <tapani.palli@intel.com>2014-04-02 19:54:37 +0300
commit0f641b2d5025a4306c6e5f9d639def4061f69667 (patch)
tree3815243063cee8abd387d5f85657d2695e7819e7 /src
parent17e7cbe078dc2d3556208212d07afe72489aae33 (diff)
mesa: remove redundant running of check_symbol_table()
Nested for loops running through tables against which they finally do an assert were ran also with optimized builds. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/program/symbol_table.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/program/symbol_table.c b/src/mesa/program/symbol_table.c
index 2f41322f60e..9462978ee4d 100644
--- a/src/mesa/program/symbol_table.c
+++ b/src/mesa/program/symbol_table.c
@@ -115,7 +115,7 @@ struct _mesa_symbol_table {
static void
check_symbol_table(struct _mesa_symbol_table *table)
{
-#if 1
+#if !defined(NDEBUG)
struct scope_level *scope;
for (scope = table->current_scope; scope != NULL; scope = scope->next) {
@@ -134,7 +134,9 @@ check_symbol_table(struct _mesa_symbol_table *table)
}
}
}
-#endif
+#else
+ (void) table;
+#endif /* !defined(NDEBUG) */
}
void