mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 00:37:15 +01:00
Minor changes I that should've been done in previous commits.
This commit is contained in:
parent
fab15840cb
commit
1c08f33604
@ -74,14 +74,14 @@ void OnSquirrelLoad()
|
||||
// Make sure that we have a valid plugin API
|
||||
if (!_SqMod)
|
||||
{
|
||||
return; // Unable to proceed.
|
||||
return; // Unable to proceed!
|
||||
}
|
||||
// Obtain the Squirrel API and VM
|
||||
_SqVM = _SqMod->GetSquirrelVM();
|
||||
// Make sure that a valid virtual machine exists
|
||||
if (!_SqVM)
|
||||
{
|
||||
return; // Unable to proceed.
|
||||
return; // Unable to proceed!
|
||||
}
|
||||
// Set this as the default database
|
||||
DefaultVM::Set(_SqVM);
|
||||
@ -107,7 +107,7 @@ void OnSquirrelTerminate()
|
||||
bool CheckAPIVer(CCStr ver)
|
||||
{
|
||||
// Obtain the numeric representation of the API version
|
||||
long vernum = strtol(ver, nullptr, 10);
|
||||
long vernum = std::strtol(ver, nullptr, 10);
|
||||
// Check against version mismatch
|
||||
if (vernum == SQMOD_API_VER)
|
||||
{
|
||||
|
@ -22,14 +22,14 @@
|
||||
namespace SqMod {
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
PluginFuncs* _Func = NULL;
|
||||
PluginCallbacks* _Clbk = NULL;
|
||||
PluginInfo* _Info = NULL;
|
||||
PluginFuncs* _Func = nullptr;
|
||||
PluginCallbacks* _Clbk = nullptr;
|
||||
PluginInfo* _Info = nullptr;
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
HSQAPI _SqAPI = NULL;
|
||||
HSQEXPORTS _SqMod = NULL;
|
||||
HSQUIRRELVM _SqVM = NULL;
|
||||
HSQAPI _SqAPI = nullptr;
|
||||
HSQEXPORTS _SqMod = nullptr;
|
||||
HSQUIRRELVM _SqVM = nullptr;
|
||||
|
||||
/* ------------------------------------------------------------------------------------------------
|
||||
* Bind speciffic functions to certain server events.
|
||||
@ -75,14 +75,14 @@ void OnSquirrelLoad()
|
||||
// Make sure that we have a valid plugin API
|
||||
if (!_SqMod)
|
||||
{
|
||||
return; // Unable to proceed.
|
||||
return; // Unable to proceed!
|
||||
}
|
||||
// Obtain the Squirrel API and VM
|
||||
_SqVM = _SqMod->GetSquirrelVM();
|
||||
// Make sure that a valid virtual machine exists
|
||||
if (!_SqVM)
|
||||
{
|
||||
return; // Unable to proceed.
|
||||
return; // Unable to proceed!
|
||||
}
|
||||
// Set this as the default database
|
||||
DefaultVM::Set(_SqVM);
|
||||
@ -99,7 +99,7 @@ void OnSquirrelTerminate()
|
||||
{
|
||||
OutputMessage("Terminating: %s", SQXML_NAME);
|
||||
// Release the current database (if any)
|
||||
DefaultVM::Set(NULL);
|
||||
DefaultVM::Set(nullptr);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
@ -108,7 +108,7 @@ void OnSquirrelTerminate()
|
||||
bool CheckAPIVer(CCStr ver)
|
||||
{
|
||||
// Obtain the numeric representation of the API version
|
||||
long vernum = strtol(ver, NULL, 10);
|
||||
long vernum = std::strtol(ver, nullptr, 10);
|
||||
// Check against version mismatch
|
||||
if (vernum == SQMOD_API_VER)
|
||||
{
|
||||
@ -170,9 +170,9 @@ void BindCallbacks()
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void UnbindCallbacks()
|
||||
{
|
||||
_Clbk->OnInitServer = NULL;
|
||||
_Clbk->OnInternalCommand = NULL;
|
||||
_Clbk->OnShutdownServer = NULL;
|
||||
_Clbk->OnInitServer = nullptr;
|
||||
_Clbk->OnInternalCommand = nullptr;
|
||||
_Clbk->OnShutdownServer = nullptr;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user