diff options
author | Connor Abbott <[email protected]> | 2014-07-08 12:21:00 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-07-15 11:16:16 -0700 |
commit | 58270c2fac493497ed7923830f49051a53e86a07 (patch) | |
tree | ca7bbef19c575c452b524b8432beedcda30e8fee /src/glsl/opt_function_inlining.cpp | |
parent | 7b0f69225afb362ec2681d9b36eae2d035b10c00 (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/glsl/opt_function_inlining.cpp')
-rw-r--r-- | src/glsl/opt_function_inlining.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/glsl/opt_function_inlining.cpp b/src/glsl/opt_function_inlining.cpp index b84bb8e11bb..64b4907bab9 100644 --- a/src/glsl/opt_function_inlining.cpp +++ b/src/glsl/opt_function_inlining.cpp @@ -100,16 +100,13 @@ ir_call::generate_inline(ir_instruction *next_ir) { void *ctx = ralloc_parent(this); ir_variable **parameters; - int num_parameters; + unsigned num_parameters; int i; struct hash_table *ht; ht = hash_table_ctor(0, hash_table_pointer_hash, hash_table_pointer_compare); - num_parameters = 0; - foreach_in_list(ir_rvalue, param, &this->callee->parameters) - num_parameters++; - + num_parameters = this->callee->parameters.length(); parameters = new ir_variable *[num_parameters]; /* Generate the declarations for the parameters to our inlined code, |