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:
@ -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");
|
||||
}
|
||||
|
@ -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.
|
||||
|
Reference in New Issue
Block a user