mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-02-20 19:57:12 +01:00
Make constructor public in script container.
Throw exception if trying to create script container with invalid VM.
This commit is contained in:
parent
2b6fdcd855
commit
2242ac9394
@ -150,8 +150,13 @@ ScriptSrc::ScriptSrc(HSQUIRRELVM vm, const String & path, bool info)
|
||||
{
|
||||
throw std::runtime_error("Invalid or empty script path");
|
||||
}
|
||||
// Is the specified virtual machine invalid?
|
||||
else if (!vm)
|
||||
{
|
||||
throw std::runtime_error("Invalid virtual machine pointer");
|
||||
}
|
||||
// Should we load the file contents for debugging purposes?
|
||||
if (info)
|
||||
else if (info)
|
||||
{
|
||||
Process();
|
||||
}
|
||||
|
@ -19,9 +19,6 @@ class Core;
|
||||
*/
|
||||
class ScriptSrc
|
||||
{
|
||||
// --------------------------------------------------------------------------------------------
|
||||
friend class Core;
|
||||
|
||||
public:
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
@ -33,8 +30,6 @@ public:
|
||||
String mData; // The contents of the script file.
|
||||
Line mLine; // List of lines of code in the data.
|
||||
|
||||
private:
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Read file contents and calculate information about the lines of code.
|
||||
*/
|
||||
@ -45,8 +40,6 @@ private:
|
||||
*/
|
||||
ScriptSrc(HSQUIRRELVM vm, const String & path, bool info = false);
|
||||
|
||||
public:
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Copy constructor.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user