diff options
author | Paul Berry <[email protected]> | 2011-08-02 15:22:25 -0700 |
---|---|---|
committer | Paul Berry <[email protected]> | 2011-08-15 17:23:02 -0700 |
commit | a52b53b56e2b5d5853345d8bcd2a4ff50e495c20 (patch) | |
tree | f2c07e702b2f0a7ce2fad0830fecdc699bf5c5b8 /src/glsl/ir.cpp | |
parent | 67b5a3267d639c31d3ac4073be877ffb0f5637d3 (diff) |
glsl: Make is_lvalue() and variable_referenced() const.
These functions don't modify the target instruction, so it makes sense
to make them const. This allows these functions to be called from ir
validation code (which uses const to ensure that it doesn't
accidentally modify the IR being validated).
Reviewed-by: Chad Versace <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r-- | src/glsl/ir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp index 827fe8e17a7..6f8676ecceb 100644 --- a/src/glsl/ir.cpp +++ b/src/glsl/ir.cpp @@ -1096,7 +1096,7 @@ ir_dereference_record::ir_dereference_record(ir_variable *var, } bool -ir_dereference::is_lvalue() +ir_dereference::is_lvalue() const { ir_variable *var = this->variable_referenced(); @@ -1310,7 +1310,7 @@ ir_swizzle::create(ir_rvalue *val, const char *str, unsigned vector_length) #undef I ir_variable * -ir_swizzle::variable_referenced() +ir_swizzle::variable_referenced() const { return this->val->variable_referenced(); } |