aboutsummaryrefslogtreecommitdiff
path: root/src/server/worldserver
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-08-14 17:06:03 +0200
committerShauren <shauren.trinity@gmail.com>2020-08-14 17:06:03 +0200
commit1c52d5fff738aa01bd27fd117076ac33515acef5 (patch)
treeff7d2113e023a0fd47fbdde8ea94c0fe4bb9a804 /src/server/worldserver
parent02fd3a1f15840203d8515dae12920d9b66655076 (diff)
Core/Misc: Replace NULL with nullptr
Diffstat (limited to 'src/server/worldserver')
-rw-r--r--src/server/worldserver/CommandLine/CliRunnable.cpp10
-rw-r--r--src/server/worldserver/TCSoap/TCSoap.cpp12
2 files changed, 11 insertions, 11 deletions
diff --git a/src/server/worldserver/CommandLine/CliRunnable.cpp b/src/server/worldserver/CommandLine/CliRunnable.cpp
index cd7b0c0e8bd..5c3f8e25391 100644
--- a/src/server/worldserver/CommandLine/CliRunnable.cpp
+++ b/src/server/worldserver/CommandLine/CliRunnable.cpp
@@ -65,12 +65,12 @@ char* command_finder(const char* text, int state)
return strdup(ret);
}
- return ((char*)NULL);
+ return nullptr;
}
char** cli_completion(const char* text, int start, int /*end*/)
{
- char** matches = NULL;
+ char** matches = nullptr;
if (start)
rl_bind_key('\t', rl_abort);
@@ -121,7 +121,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
@@ -158,7 +158,7 @@ void CliThread()
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')
@@ -189,7 +189,7 @@ void CliThread()
}
fflush(stdout);
- sWorld->QueueCliCommand(new CliCommandHolder(NULL, command.c_str(), &utf8print, &commandFinished));
+ sWorld->QueueCliCommand(new CliCommandHolder(nullptr, command.c_str(), &utf8print, &commandFinished));
#if TRINITY_PLATFORM != TRINITY_PLATFORM_WINDOWS
add_history(command.c_str());
free(command_str);
diff --git a/src/server/worldserver/TCSoap/TCSoap.cpp b/src/server/worldserver/TCSoap/TCSoap.cpp
index cd11a364cf2..b5c0804bd44 100644
--- a/src/server/worldserver/TCSoap/TCSoap.cpp
+++ b/src/server/worldserver/TCSoap/TCSoap.cpp
@@ -137,10 +137,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
- { "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:TC", NULL, NULL }, // "ns1" namespace prefix
- { NULL, NULL, NULL, NULL }
+{ { "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", nullptr },
+ { "xsd", "http://www.w3.org/1999/XMLSchema", "http://www.w3.org/*/XMLSchema", nullptr },
+ { "ns1", "urn:TC", nullptr, nullptr }, // "ns1" namespace prefix
+ { nullptr, nullptr, nullptr, nullptr }
};