1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-15 22:57:12 +02:00

Remove the need to specify a VM after new changes.

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

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");
}

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.