Codechange: Keep Squirrel engine in unique_ptr.

This commit is contained in:
Peter Nelson
2025-03-26 11:58:56 +00:00
committed by Peter Nelson
parent bf6d0c4934
commit 8f34b7a821
3 changed files with 5 additions and 10 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ public:
/**
* Get the engine of the main squirrel handler (it indexes all available scripts).
*/
class Squirrel *GetEngine() { return this->engine; }
class Squirrel *GetEngine() { return this->engine.get(); }
/**
* Get the current main script the ScanDir is currently tracking.
@@ -84,7 +84,7 @@ public:
void RescanDir();
protected:
class Squirrel *engine; ///< The engine we're scanning with.
std::unique_ptr<class Squirrel> engine; ///< The engine we're scanning with.
std::string main_script; ///< The full path of the script.
std::string tar_file; ///< If, which tar file the script was in.