summaryrefslogtreecommitdiffstats
path: root/src/glsl/ir_clone.cpp
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2014-06-24 21:34:05 -0700
committerMatt Turner <mattst88@gmail.com>2014-07-01 08:55:51 -0700
commit4d78446d782e2d942b4cd0cd00a27bf922ccd479 (patch)
treeeaaa99ce79c54ddef6cf35c8d3d028b9e0aa44b4 /src/glsl/ir_clone.cpp
parentda9f0316e6ea628c085040a0c145580301207489 (diff)
downloadexternal_mesa3d-4d78446d782e2d942b4cd0cd00a27bf922ccd479.zip
external_mesa3d-4d78446d782e2d942b4cd0cd00a27bf922ccd479.tar.gz
external_mesa3d-4d78446d782e2d942b4cd0cd00a27bf922ccd479.tar.bz2
glsl: Use typed foreach_in_list instead of foreach_list.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/glsl/ir_clone.cpp')
-rw-r--r--src/glsl/ir_clone.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp
index c00adc5..86a6205 100644
--- a/src/glsl/ir_clone.cpp
+++ b/src/glsl/ir_clone.cpp
@@ -123,13 +123,11 @@ ir_if::clone(void *mem_ctx, struct hash_table *ht) const
{
ir_if *new_if = new(mem_ctx) ir_if(this->condition->clone(mem_ctx, ht));
- foreach_list(n, &this->then_instructions) {
- ir_instruction *ir = (ir_instruction *) n;
+ foreach_in_list(ir_instruction, ir, &this->then_instructions) {
new_if->then_instructions.push_tail(ir->clone(mem_ctx, ht));
}
- foreach_list(n, &this->else_instructions) {
- ir_instruction *ir = (ir_instruction *) n;
+ foreach_in_list(ir_instruction, ir, &this->else_instructions) {
new_if->else_instructions.push_tail(ir->clone(mem_ctx, ht));
}
@@ -141,8 +139,7 @@ ir_loop::clone(void *mem_ctx, struct hash_table *ht) const
{
ir_loop *new_loop = new(mem_ctx) ir_loop();
- foreach_list(n, &this->body_instructions) {
- ir_instruction *ir = (ir_instruction *) n;
+ foreach_in_list(ir_instruction, ir, &this->body_instructions) {
new_loop->body_instructions.push_tail(ir->clone(mem_ctx, ht));
}
@@ -158,8 +155,7 @@ ir_call::clone(void *mem_ctx, struct hash_table *ht) const
exec_list new_parameters;
- foreach_list(n, &this->actual_parameters) {
- ir_instruction *ir = (ir_instruction *) n;
+ foreach_in_list(ir_instruction, ir, &this->actual_parameters) {
new_parameters.push_tail(ir->clone(mem_ctx, ht));
}