Implements initial math library, several reworks for Userdata memory management
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -65,6 +65,13 @@ namespace Porygon {
|
||||
this -> RegisterFunctionOption(option);
|
||||
};
|
||||
|
||||
explicit GenericFunctionScriptType(const vector<GenericFunctionOption*>& options)
|
||||
: ScriptType(Porygon::TypeClass::Function){
|
||||
for (auto option: options){
|
||||
this -> RegisterFunctionOption(option);
|
||||
}
|
||||
};
|
||||
|
||||
~GenericFunctionScriptType() final{
|
||||
for (auto o: *_options){
|
||||
delete o;
|
||||
@@ -72,9 +79,10 @@ namespace Porygon {
|
||||
delete _options;
|
||||
}
|
||||
|
||||
void RegisterFunctionOption (GenericFunctionOption * opt) const{
|
||||
const GenericFunctionScriptType* RegisterFunctionOption (GenericFunctionOption * opt) const{
|
||||
opt->SetOption(_options->size());
|
||||
_options->push_back(opt);
|
||||
return this;
|
||||
}
|
||||
|
||||
GenericFunctionOption* GetFunctionOption(const vector<shared_ptr<const ScriptType>>& parameters) const{
|
||||
|
||||
Reference in New Issue
Block a user