projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98f32a1
)
ir_constant_expression: Remove pointless use of variable_referenced.
author
Kenneth Graunke
<kenneth@whitecape.org>
Thu, 15 Jul 2010 17:27:53 +0000
(10:27 -0700)
committer
Ian Romanick
<ian.d.romanick@intel.com>
Wed, 21 Jul 2010 00:10:05 +0000
(17:10 -0700)
ir_dereference_variable always references an ir_variable, so there's no
point in calling a function and NULL-checking the result.
src/glsl/ir_constant_expression.cpp
patch
|
blob
|
history
diff --git
a/src/glsl/ir_constant_expression.cpp
b/src/glsl/ir_constant_expression.cpp
index 186d0c48c1283ce1878e40751b4a22e6dee52253..cb07f381281c6e235b02f153d32791575ae24de0 100644
(file)
--- 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;
}