Shader: StatementPtr& => const StatementPtr&
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
namespace Nz::ShaderAst
|
||||
{
|
||||
ExpressionPtr AstCloner::Clone(ExpressionPtr& expr)
|
||||
ExpressionPtr AstCloner::Clone(const ExpressionPtr& expr)
|
||||
{
|
||||
expr->Visit(*this);
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Nz::ShaderAst
|
||||
return PopExpression();
|
||||
}
|
||||
|
||||
StatementPtr AstCloner::Clone(StatementPtr& statement)
|
||||
StatementPtr AstCloner::Clone(const StatementPtr& statement)
|
||||
{
|
||||
statement->Visit(*this);
|
||||
|
||||
|
||||
@@ -380,13 +380,13 @@ namespace Nz::ShaderAst
|
||||
#undef EnableOptimisation
|
||||
}
|
||||
|
||||
StatementPtr AstOptimizer::Optimise(StatementPtr& statement)
|
||||
StatementPtr AstOptimizer::Optimise(const StatementPtr& statement)
|
||||
{
|
||||
m_enabledOptions.reset();
|
||||
return CloneStatement(statement);
|
||||
}
|
||||
|
||||
StatementPtr AstOptimizer::Optimise(StatementPtr& statement, UInt64 enabledConditions)
|
||||
StatementPtr AstOptimizer::Optimise(const StatementPtr& statement, UInt64 enabledConditions)
|
||||
{
|
||||
m_enabledOptions = enabledConditions;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Nz::ShaderAst
|
||||
std::unordered_set<unsigned int> usedBindingIndexes;
|
||||
};
|
||||
|
||||
StatementPtr SanitizeVisitor::Sanitize(StatementPtr& nodePtr, const Options& options, std::string* error)
|
||||
StatementPtr SanitizeVisitor::Sanitize(const StatementPtr& nodePtr, const Options& options, std::string* error)
|
||||
{
|
||||
StatementPtr clone;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user