diff options
| author | Shauren <shauren.trinity@gmail.com> | 2020-08-14 17:06:03 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2020-08-14 17:06:03 +0200 |
| commit | 1c52d5fff738aa01bd27fd117076ac33515acef5 (patch) | |
| tree | ff7d2113e023a0fd47fbdde8ea94c0fe4bb9a804 /src/server/worldserver/CommandLine | |
| parent | 02fd3a1f15840203d8515dae12920d9b66655076 (diff) | |
Core/Misc: Replace NULL with nullptr
Diffstat (limited to 'src/server/worldserver/CommandLine')
| -rw-r--r-- | src/server/worldserver/CommandLine/CliRunnable.cpp | 10 |
1 files changed, 5 insertions, 5 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); |
