summaryrefslogtreecommitdiffstats
path: root/src/mesa/program/ir_to_mesa.cpp
diff options
context:
space:
mode:
authorConnor Abbott <[email protected]>2014-07-08 12:21:00 -0700
committerMatt Turner <[email protected]>2014-07-15 11:16:16 -0700
commit58270c2fac493497ed7923830f49051a53e86a07 (patch)
treeca7bbef19c575c452b524b8432beedcda30e8fee /src/mesa/program/ir_to_mesa.cpp
parent7b0f69225afb362ec2681d9b36eae2d035b10c00 (diff)
exec_list: Make various places use the new length() method.
Instead of hand-rolling it. v2 [mattst88]: Rename get_size to length. Expand comment in ir_reader. Reviewed-by: Ian Romanick <[email protected]> [v1] Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/mesa/program/ir_to_mesa.cpp')
-rw-r--r--src/mesa/program/ir_to_mesa.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 8aefcf7e2b3..2a82e9d9ddc 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -2817,10 +2817,7 @@ get_mesa_program(struct gl_context *ctx,
prog->NumTemporaries = v.next_temp;
- int num_instructions = 0;
- foreach_in_list(ir_instruction, node, &v.instructions) {
- num_instructions++;
- }
+ unsigned num_instructions = v.instructions.length();
mesa_instructions =
(struct prog_instruction *)calloc(num_instructions,