summaryrefslogtreecommitdiff
path: root/src/glsl/ast_to_hir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-07-06 17:41:02 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-07-06 17:44:37 -0700
commitca088cc277ce9f986693c857f3961dc0e1a4d91c (patch)
treebaec2a0f395913a7439c2c72803be0604cef377e /src/glsl/ast_to_hir.cpp
parentf14e596f11b4e44c75a880536efb1e8c5a72da7d (diff)
glsl2: Clone methods return the type of the thing being cloned
This is as opposed to returning the type of the base class of the hierarchy.
Diffstat (limited to 'src/glsl/ast_to_hir.cpp')
-rw-r--r--src/glsl/ast_to_hir.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index 3bd0bd6591..f5e93b0254 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -961,7 +961,7 @@ ast_expression::hir(exec_list *instructions,
op[0], op[1]);
result = do_assignment(instructions, state,
- (ir_rvalue *)op[0]->clone(NULL), temp_rhs,
+ op[0]->clone(NULL), temp_rhs,
this->subexpressions[0]->get_location());
type = result->type;
error_emitted = (op[0]->type->is_error());
@@ -987,7 +987,7 @@ ast_expression::hir(exec_list *instructions,
op[0], op[1]);
result = do_assignment(instructions, state,
- (ir_rvalue *)op[0]->clone(NULL), temp_rhs,
+ op[0]->clone(NULL), temp_rhs,
this->subexpressions[0]->get_location());
type = result->type;
error_emitted = type->is_error();
@@ -1107,7 +1107,7 @@ ast_expression::hir(exec_list *instructions,
op[0], op[1]);
result = do_assignment(instructions, state,
- (ir_rvalue *)op[0]->clone(NULL), temp_rhs,
+ op[0]->clone(NULL), temp_rhs,
this->subexpressions[0]->get_location());
type = result->type;
error_emitted = op[0]->type->is_error();
@@ -1133,10 +1133,10 @@ ast_expression::hir(exec_list *instructions,
/* Get a temporary of a copy of the lvalue before it's modified.
* This may get thrown away later.
*/
- result = get_lvalue_copy(instructions, (ir_rvalue *)op[0]->clone(NULL));
+ result = get_lvalue_copy(instructions, op[0]->clone(NULL));
(void)do_assignment(instructions, state,
- (ir_rvalue *)op[0]->clone(NULL), temp_rhs,
+ op[0]->clone(NULL), temp_rhs,
this->subexpressions[0]->get_location());
type = result->type;