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

@@ -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);