Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Optimize()

override ExpressionNode System.Data.FunctionNode.Optimize ( )
inlinepackage

Definition at line 240 of file FunctionNode.cs.

241 {
242 for (int i = 0; i < _argumentCount; i++)
243 {
245 }
246 if (s_funcs[_info]._id == FunctionId.In)
247 {
248 if (!IsConstant())
249 {
250 throw ExprException.NonConstantArgument();
251 }
252 }
253 else if (IsConstant())
254 {
255 return new ConstNode(base.table, ValueType.Object, Eval(), fParseQuotes: false);
256 }
257 return this;
258 }
ExpressionNode Optimize()
override object Eval()
static readonly Function[] s_funcs
ExpressionNode[] _arguments
override bool IsConstant()

References System.Data.FunctionNode._argumentCount, System.Data.FunctionNode._arguments, System.Data.FunctionNode._info, System.Data.FunctionNode.Eval(), System.Data.FunctionNode.IsConstant(), System.Data.ExprException.NonConstantArgument(), System.Data.ExpressionNode.Optimize(), and System.Data.FunctionNode.s_funcs.