Large overhaul of pointers to shared_ptrs, implemented function evaluation
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user