Rework evaluation to use shared pointers, fix bugs

This commit is contained in:
2019-06-01 21:38:39 +02:00
parent 4408cf00cd
commit 6206fef4c5
17 changed files with 122 additions and 133 deletions

View File

@@ -25,10 +25,11 @@ public:
return _type;
}
EvalValue* Clone() final{
return new ScriptFunctionEvalValue(_innerBlock, _type);
shared_ptr<EvalValue> Clone() final{
return make_shared<ScriptFunctionEvalValue>(_innerBlock, _type);
}
bool operator ==(EvalValue* b) final{
if (b->GetType()->GetClass() != TypeClass::Function)
return false;