diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2010-07-15 10:27:53 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-07-20 17:10:05 -0700 |
commit | e4768eecd5da6f9e955aa7c3892810813623f0dc (patch) | |
tree | 436b3d5be642ac0cf03cf366f93e0177a7119d03 /src | |
parent | 98f32a13bef1eef732304eb8e2781e08835ff69a (diff) |
ir_constant_expression: Remove pointless use of variable_referenced.
ir_dereference_variable always references an ir_variable, so there's no
point in calling a function and NULL-checking the result.
Diffstat (limited to 'src')
-rw-r--r-- | src/glsl/ir_constant_expression.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index 186d0c48c1..cb07f38128 100644 --- a/src/glsl/ir_constant_expression.cpp +++ b/src/glsl/ir_constant_expression.cpp @@ -695,10 +695,7 @@ ir_swizzle::constant_expression_value() ir_constant * ir_dereference_variable::constant_expression_value() { - ir_variable *var = this->variable_referenced(); - if (var && var->constant_value) - return var->constant_value->clone(NULL); - return NULL; + return var->constant_value ? var->constant_value->clone(NULL) : NULL; } |