Remove the need to specify a VM after new changes.

This commit is contained in:
Sandu Liviu Catalin committed 2020-09-04 18:52:09 +03:00
1 parent 78fac29da0
commit 6fa8e85189
3 files changed
+6 -11

No files matched your search

+3 -8
View File
@@ -151,21 +151,16 @@ void ScriptSrc::Process()
}
// ------------------------------------------------------------------------------------------------
ScriptSrc::ScriptSrc(HSQUIRRELVM vm, const String & path, bool delay, bool info)
: mExec(vm)
ScriptSrc::ScriptSrc(const String & path, bool delay, bool info)
: mExec()
, mPath(path)
, mData()
, mLine()
, mInfo(info)
, mDelay(delay)
{
// Is the specified virtual machine invalid?
if (!vm)
{
throw std::runtime_error("Invalid virtual machine pointer");
}
// Is the specified path empty?
else if (mPath.empty())
if (mPath.empty())
{
throw std::runtime_error("Invalid or empty script path");
}
+1 -1
View File
@@ -39,7 +39,7 @@ public:
/* --------------------------------------------------------------------------------------------
* Base constructor.
*/
ScriptSrc(HSQUIRRELVM vm, const String & path, bool delay = false, bool info = false);
ScriptSrc(const String & path, bool delay = false, bool info = false);
/* --------------------------------------------------------------------------------------------
* Copy constructor.