Change: [Script] Automate the ScriptObject reference counting

This commit is contained in:
Rubidium
2023-02-28 17:13:38 +01:00
committed by Loïc Guilloux
parent a1fc4d5c0e
commit 728973859d
3 changed files with 72 additions and 15 deletions

View File

@@ -90,7 +90,6 @@ public:
*/
ScriptText(StringID string, ...);
#endif /* DOXYGEN_API */
~ScriptText();
#ifndef DOXYGEN_API
/**
@@ -129,8 +128,10 @@ public:
virtual const std::string GetEncodedText();
private:
using ScriptTextRef = ScriptObjectRef<ScriptText>;
StringID string;
std::variant<SQInteger, std::string, ScriptText *> param[SCRIPT_TEXT_MAX_PARAMETERS];
std::variant<SQInteger, std::string, ScriptTextRef> param[SCRIPT_TEXT_MAX_PARAMETERS];
int paramc;
/**