diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-02 14:52:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 14:52:36 +0200 |
commit | 058a0afdeca83145d58a95c426dd01216c397ea9 (patch) | |
tree | be0cd59e5a90926e9d653fed9f3b1b77e735ca2f /core/message_queue.cpp | |
parent | 5f11e1557156617366d2c316a97716172103980d (diff) | |
parent | 95a1400a2ac9de1a29fa305f45b928ce8e3044bd (diff) |
Merge pull request #37338 from lupoDharkael/nullprt
Replace NULL with nullptr
Diffstat (limited to 'core/message_queue.cpp')
-rw-r--r-- | core/message_queue.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/message_queue.cpp b/core/message_queue.cpp index 26f5b23416..652c424492 100644 --- a/core/message_queue.cpp +++ b/core/message_queue.cpp @@ -34,7 +34,7 @@ #include "core/project_settings.h" #include "core/script_language.h" -MessageQueue *MessageQueue::singleton = NULL; +MessageQueue *MessageQueue::singleton = nullptr; MessageQueue *MessageQueue::get_singleton() { @@ -174,7 +174,7 @@ void MessageQueue::statistics() { Object *target = message->callable.get_object(); - if (target != NULL) { + if (target != nullptr) { switch (message->type & FLAG_MASK) { @@ -240,7 +240,7 @@ int MessageQueue::get_max_buffer_usage() const { void MessageQueue::_call_function(const Callable &p_callable, const Variant *p_args, int p_argcount, bool p_show_error) { - const Variant **argptrs = NULL; + const Variant **argptrs = nullptr; if (p_argcount) { argptrs = (const Variant **)alloca(sizeof(Variant *) * p_argcount); for (int i = 0; i < p_argcount; i++) { @@ -291,7 +291,7 @@ void MessageQueue::flush() { Object *target = message->callable.get_object(); - if (target != NULL) { + if (target != nullptr) { switch (message->type & FLAG_MASK) { case TYPE_CALL: { @@ -343,7 +343,7 @@ bool MessageQueue::is_flushing() const { MessageQueue::MessageQueue() { - ERR_FAIL_COND_MSG(singleton != NULL, "A MessageQueue singleton already exists."); + ERR_FAIL_COND_MSG(singleton != nullptr, "A MessageQueue singleton already exists."); singleton = this; flushing = false; @@ -375,6 +375,6 @@ MessageQueue::~MessageQueue() { read_pos += sizeof(Variant) * message->args; } - singleton = NULL; + singleton = nullptr; memdelete_arr(buffer); } |