Rework evaluation to use shared pointers, fix bugs
This commit is contained in:
@@ -20,7 +20,7 @@ public:
|
||||
return ! (this->operator==(b));
|
||||
}
|
||||
|
||||
virtual EvalValue* Clone() = 0;
|
||||
virtual shared_ptr<EvalValue> Clone() = 0;
|
||||
|
||||
virtual long EvaluateInteger(){
|
||||
throw EvaluationException("Can't evaluate this EvalValue as integer.");
|
||||
@@ -45,8 +45,8 @@ public:
|
||||
_type = std::make_shared<ScriptType>(TypeClass::Bool);
|
||||
}
|
||||
|
||||
EvalValue* Clone() final{
|
||||
return new BooleanEvalValue(_value);
|
||||
shared_ptr<EvalValue> Clone() final{
|
||||
return make_shared<BooleanEvalValue>(_value);
|
||||
}
|
||||
|
||||
std::shared_ptr<ScriptType> GetType() final{
|
||||
|
||||
Reference in New Issue
Block a user