diff options
author | marha <marha@users.sourceforge.net> | 2014-07-04 19:52:56 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2014-07-04 19:52:56 +0200 |
commit | 62ed212e1add98e39c0f7a6e5a8a5726d66f161e (patch) | |
tree | a80c4bf566c76665b3449f13fac7de72c66aa80a /mesalib/src/glsl/opt_dead_functions.cpp | |
parent | 3095a03ec3cb1f05b49362327d10a767299d7635 (diff) | |
parent | fe03d6aef6338e43593f164b09ae993bcd0ecbdd (diff) | |
download | vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.tar.gz vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.tar.bz2 vcxsrv-62ed212e1add98e39c0f7a6e5a8a5726d66f161e.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/glsl/opt_dead_functions.cpp')
-rw-r--r-- | mesalib/src/glsl/opt_dead_functions.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mesalib/src/glsl/opt_dead_functions.cpp b/mesalib/src/glsl/opt_dead_functions.cpp index 8bb278e45..5dff16521 100644 --- a/mesalib/src/glsl/opt_dead_functions.cpp +++ b/mesalib/src/glsl/opt_dead_functions.cpp @@ -74,8 +74,7 @@ public: signature_entry * ir_dead_functions_visitor::get_signature_entry(ir_function_signature *sig) { - foreach_list(n, &this->signature_list) { - signature_entry *entry = (signature_entry *) n; + foreach_in_list(signature_entry, entry, &this->signature_list) { if (entry->signature == sig) return entry; } @@ -123,9 +122,7 @@ do_dead_functions(exec_list *instructions) * the unused ones, and remove function definitions that have no more * signatures. */ - foreach_list_safe(n, &v.signature_list) { - signature_entry *entry = (signature_entry *) n; - + foreach_in_list_safe(signature_entry, entry, &v.signature_list) { if (!entry->used) { entry->signature->remove(); delete entry->signature; @@ -137,8 +134,7 @@ do_dead_functions(exec_list *instructions) /* We don't just do this above when we nuked a signature because of * const pointers. */ - foreach_list_safe(n, instructions) { - ir_instruction *ir = (ir_instruction *) n; + foreach_in_list_safe(ir_instruction, ir, instructions) { ir_function *func = ir->as_function(); if (func && func->signatures.is_empty()) { |