]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix an issue with folding the sole argument of a conversion
authorMikko Rasa <tdb@tdb.fi>
Thu, 22 Apr 2021 12:20:49 +0000 (15:20 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 22 Apr 2021 12:20:49 +0000 (15:20 +0300)
source/glsl/optimize.cpp

index 2e7f8aa733b5b9acda8bdb0e1529930e3e7a01e0..593a3222533874b6d8fde6265608efd9642e46e1 100644 (file)
@@ -804,7 +804,7 @@ void ConstantFolder::visit(FunctionCall &call)
                const BasicTypeDeclaration *basic = dynamic_cast<const BasicTypeDeclaration *>(call.type);
                if(basic)
                {
-                       call.arguments[0]->visit(*this);
+                       visit(call.arguments[0]);
                        bool can_fold = r_constant;
                        r_constant = false;
                        if(!can_fold)