aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/opt_dead_functions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/opt_dead_functions.cpp')
-rw-r--r--mesalib/src/glsl/opt_dead_functions.cpp10
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()) {