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

@@ -48,8 +48,8 @@ public:
return strs.str();
}
EvalValue* Clone() final{
return new IntegerEvalValue(_value);
shared_ptr<EvalValue> Clone() final{
return make_shared<IntegerEvalValue>(_value);
}
};
@@ -76,8 +76,8 @@ public:
return strs.str();
}
EvalValue* Clone() final{
return new FloatEvalValue(_value);
shared_ptr<EvalValue> Clone() final{
return make_shared<FloatEvalValue>(_value);
}
};