Shader/ShaderAstOptimizer: Fix branch optimization

This commit is contained in:
Jérôme Leclercq
2021-01-15 19:19:19 +01:00
parent bb18ca13ca
commit 711199fe51

View File

@@ -470,6 +470,12 @@ namespace Nz
break;
}
}
else
{
auto& c = statements.emplace_back();
c.condition = std::move(cond);
c.statement = CloneStatement(condStatement.statement);
}
}
if (statements.empty())