Large overhaul of pointers to shared_ptrs, implemented function evaluation

This commit is contained in:
2019-06-01 19:20:31 +02:00
parent 8b70eed516
commit 4408cf00cd
17 changed files with 261 additions and 129 deletions

View File

@@ -9,17 +9,14 @@ using namespace std;
class StringEvalValue : public EvalValue{
string _value;
ScriptType* _type;
std::shared_ptr<ScriptType> _type;
public:
explicit StringEvalValue(string s){
_value = move(s);
_type = new ScriptType(TypeClass::String);
}
~StringEvalValue() final{
delete _type;
_type = std::make_shared<ScriptType>(TypeClass::String);
}
ScriptType* GetType() final{
std::shared_ptr<ScriptType> GetType() final{
return _type;
};
bool operator ==(EvalValue* b) final{