]> git.tdb.fi Git - libs/gl.git/blobdiff - source/glsl/generate.cpp
Rename and rearrange a few things
[libs/gl.git] / source / glsl / generate.cpp
index 29d52364c1506f1dc151aad780c584dc13b0eab6..09a776afb7f60bb61d2bdc47d0a8f3fb9e470b3e 100644 (file)
@@ -591,11 +591,11 @@ void ExpressionResolver::convert_to(RefPtr<Expression> &expr, BasicTypeDeclarati
 
 bool ExpressionResolver::convert_to_element(RefPtr<Expression> &expr, BasicTypeDeclaration &elem_type)
 {
-       if(BasicTypeDeclaration *expr_type = dynamic_cast<BasicTypeDeclaration *>(expr->type))
+       if(BasicTypeDeclaration *expr_basic = dynamic_cast<BasicTypeDeclaration *>(expr->type))
        {
                BasicTypeDeclaration *to_type = &elem_type;
-               if(is_vector_or_matrix(*expr_type))
-                       to_type = find_type(elem_type, expr_type->kind, expr_type->size);
+               if(is_vector_or_matrix(*expr_basic))
+                       to_type = find_type(elem_type, expr_basic->kind, expr_basic->size);
                if(to_type)
                {
                        convert_to(expr, *to_type);