]> git.tdb.fi Git - libs/gl.git/commitdiff
Recognize an assignment to an out parameter as used
authorMikko Rasa <tdb@tdb.fi>
Wed, 5 Feb 2020 21:48:46 +0000 (23:48 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 5 Feb 2020 21:48:46 +0000 (23:48 +0200)
source/programcompiler.cpp

index 4c08a0c1e1e34bf84c4e99e0d9f6f33090d6d103..d021ab4f75732769855e9370fe0c8eec990aca20 100644 (file)
@@ -1681,7 +1681,7 @@ void ProgramCompiler::UnusedVariableLocator::merge_down_variables()
                {
                        if(!i->second.referenced)
                                unused_nodes.insert(i->first);
-                       clear_assignments(i->second, true);
+                       clear_assignments(i->second, i->first->interface!="out");
                        continue;
                }