refactor(Core): NULL -> nullptr (#3275)

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

* NULL to nullptr

Co-authored-by: Francesco Borzì <borzifrancesco@gmail.com>
Co-authored-by: Stefano Borzì <stefanoborzi32@gmail.com>
This commit is contained in:
Kitzunu
2020-08-31 11:55:09 +02:00
committed by GitHub
parent 38903b5dfb
commit 1f89282b22
325 changed files with 2348 additions and 2348 deletions

View File

@@ -151,10 +151,10 @@ void SOAPCommand::commandFinished(void* soapconnection, bool success)
////////////////////////////////////////////////////////////////////////////////
struct Namespace namespaces[] =
{ { "SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", NULL, NULL }, // must be first
{ "SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", NULL, NULL }, // must be second
{ { "SOAP-ENV", "http://schemas.xmlsoap.org/soap/envelope/", nullptr, nullptr }, // must be first
{ "SOAP-ENC", "http://schemas.xmlsoap.org/soap/encoding/", nullptr, nullptr }, // must be second
{ "xsi", "http://www.w3.org/1999/XMLSchema-instance", "http://www.w3.org/*/XMLSchema-instance", NULL },
{ "xsd", "http://www.w3.org/1999/XMLSchema", "http://www.w3.org/*/XMLSchema", NULL },
{ "ns1", "urn:AC", NULL, NULL }, // "ns1" namespace prefix
{ NULL, NULL, NULL, NULL }
{ "ns1", "urn:AC", nullptr, nullptr }, // "ns1" namespace prefix
{ nullptr, nullptr, nullptr, nullptr }
};

View File

@@ -59,7 +59,7 @@ char* command_finder(const char* text, int state)
char** cli_completion(const char* text, int start, int /*end*/)
{
char** matches = NULL;
char** matches = nullptr;
if (start)
rl_bind_key('\t', rl_abort);
@@ -112,7 +112,7 @@ int kb_hit_return()
tv.tv_usec = 0;
FD_ZERO(&fds);
FD_SET(STDIN_FILENO, &fds);
select(STDIN_FILENO+1, &fds, NULL, NULL, &tv);
select(STDIN_FILENO+1, &fds, nullptr, nullptr, &tv);
return FD_ISSET(STDIN_FILENO, &fds);
}
#endif
@@ -149,7 +149,7 @@ void CliRunnable::run()
rl_bind_key('\t', rl_complete);
#endif
if (command_str != NULL)
if (command_str != nullptr)
{
for (int x=0; command_str[x]; ++x)
if (command_str[x] == '\r' || command_str[x] == '\n')
@@ -180,7 +180,7 @@ void CliRunnable::run()
}
fflush(stdout);
sWorld->QueueCliCommand(new CliCommandHolder(NULL, command.c_str(), &utf8print, &commandFinished));
sWorld->QueueCliCommand(new CliCommandHolder(nullptr, command.c_str(), &utf8print, &commandFinished));
#if AC_PLATFORM != AC_PLATFORM_WINDOWS
add_history(command.c_str());
free(command_str);

View File

@@ -183,7 +183,7 @@ int Master::Run()
acore::Thread worldThread(new WorldRunnable);
worldThread.setPriority(acore::Priority_Highest);
acore::Thread* cliThread = NULL;
acore::Thread* cliThread = nullptr;
#ifdef _WIN32
if (sConfigMgr->GetBoolDefault("Console.Enable", true) && (m_ServiceStatus == -1)/* need disable console in service mode*/)
@@ -271,7 +271,7 @@ int Master::Run()
#endif
// Start soap serving thread
acore::Thread* soapThread = NULL;
acore::Thread* soapThread = nullptr;
if (sConfigMgr->GetBoolDefault("SOAP.Enabled", false))
{
ACSoapRunnable* runnable = new ACSoapRunnable();
@@ -280,7 +280,7 @@ int Master::Run()
}
// Start up freeze catcher thread
acore::Thread* freezeThread = NULL;
acore::Thread* freezeThread = nullptr;
if (uint32 freezeDelay = sConfigMgr->GetIntDefault("MaxCoreStuckTime", 0))
{
FreezeDetectorRunnable* runnable = new FreezeDetectorRunnable(freezeDelay*1000);