From 58270c2fac493497ed7923830f49051a53e86a07 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 8 Jul 2014 12:21:00 -0700 Subject: 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 [v1] Reviewed-by: Matt Turner Signed-off-by: Connor Abbott --- src/mesa/program/ir_to_mesa.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/mesa/program/ir_to_mesa.cpp') 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, -- cgit v1.2.3