Replace NULL with nullptr
This commit is contained in:
@ -227,7 +227,7 @@ Array DebuggerMarshalls::ScriptStackVariable::serialize(int max_size) {
|
||||
}
|
||||
|
||||
int len = 0;
|
||||
Error err = encode_variant(var, NULL, len, true);
|
||||
Error err = encode_variant(var, nullptr, len, true);
|
||||
if (err != OK)
|
||||
ERR_PRINT("Failed to encode variant.");
|
||||
|
||||
|
||||
@ -35,8 +35,8 @@
|
||||
#include "core/debugger/script_debugger.h"
|
||||
#include "core/os/os.h"
|
||||
|
||||
EngineDebugger *EngineDebugger::singleton = NULL;
|
||||
ScriptDebugger *EngineDebugger::script_debugger = NULL;
|
||||
EngineDebugger *EngineDebugger::singleton = nullptr;
|
||||
ScriptDebugger *EngineDebugger::script_debugger = nullptr;
|
||||
|
||||
Map<StringName, EngineDebugger::Profiler> EngineDebugger::profilers;
|
||||
Map<StringName, EngineDebugger::Capture> EngineDebugger::captures;
|
||||
@ -173,7 +173,7 @@ void EngineDebugger::deinitialize() {
|
||||
singleton->poll_events(false);
|
||||
|
||||
memdelete(singleton);
|
||||
singleton = NULL;
|
||||
singleton = nullptr;
|
||||
profilers.clear();
|
||||
captures.clear();
|
||||
}
|
||||
@ -181,6 +181,6 @@ void EngineDebugger::deinitialize() {
|
||||
EngineDebugger::~EngineDebugger() {
|
||||
if (script_debugger)
|
||||
memdelete(script_debugger);
|
||||
script_debugger = NULL;
|
||||
singleton = NULL;
|
||||
script_debugger = nullptr;
|
||||
singleton = nullptr;
|
||||
}
|
||||
|
||||
@ -50,10 +50,10 @@ public:
|
||||
class Profiler {
|
||||
friend class EngineDebugger;
|
||||
|
||||
ProfilingToggle toggle = NULL;
|
||||
ProfilingAdd add = NULL;
|
||||
ProfilingTick tick = NULL;
|
||||
void *data = NULL;
|
||||
ProfilingToggle toggle = nullptr;
|
||||
ProfilingAdd add = nullptr;
|
||||
ProfilingTick tick = nullptr;
|
||||
void *data = nullptr;
|
||||
bool active = false;
|
||||
|
||||
public:
|
||||
@ -69,8 +69,8 @@ public:
|
||||
class Capture {
|
||||
friend class EngineDebugger;
|
||||
|
||||
CaptureFunc capture = NULL;
|
||||
void *data = NULL;
|
||||
CaptureFunc capture = nullptr;
|
||||
void *data = nullptr;
|
||||
|
||||
public:
|
||||
Capture() {}
|
||||
@ -97,7 +97,7 @@ protected:
|
||||
|
||||
public:
|
||||
_FORCE_INLINE_ static EngineDebugger *get_singleton() { return singleton; }
|
||||
_FORCE_INLINE_ static bool is_active() { return singleton != NULL && script_debugger != NULL; }
|
||||
_FORCE_INLINE_ static bool is_active() { return singleton != nullptr && script_debugger != nullptr; }
|
||||
|
||||
_FORCE_INLINE_ static ScriptDebugger *get_script_debugger() { return script_debugger; };
|
||||
|
||||
|
||||
@ -402,7 +402,7 @@ LocalDebugger::LocalDebugger() {
|
||||
[](void *p_user, bool p_enable, const Array &p_opts) {
|
||||
((ScriptsProfiler *)p_user)->toggle(p_enable, p_opts);
|
||||
},
|
||||
NULL,
|
||||
nullptr,
|
||||
[](void *p_user, float p_frame_time, float p_idle_time, float p_physics_time, float p_physics_frame_time) {
|
||||
((ScriptsProfiler *)p_user)->tick(p_frame_time, p_idle_time, p_physics_time, p_physics_frame_time);
|
||||
});
|
||||
|
||||
@ -40,7 +40,7 @@ class LocalDebugger : public EngineDebugger {
|
||||
private:
|
||||
struct ScriptsProfiler;
|
||||
|
||||
ScriptsProfiler *scripts_profiler = NULL;
|
||||
ScriptsProfiler *scripts_profiler = nullptr;
|
||||
|
||||
String target_function;
|
||||
Map<String, String> options;
|
||||
|
||||
@ -373,7 +373,7 @@ struct RemoteDebugger::VisualProfiler {
|
||||
|
||||
struct RemoteDebugger::PerformanceProfiler {
|
||||
|
||||
Object *performance = NULL;
|
||||
Object *performance = nullptr;
|
||||
int last_perf_time = 0;
|
||||
|
||||
void toggle(bool p_enable, const Array &p_opts) {}
|
||||
@ -867,7 +867,7 @@ RemoteDebugger *RemoteDebugger::create_for_uri(const String &p_uri) {
|
||||
Ref<RemoteDebuggerPeer> peer = RemoteDebuggerPeer::create_from_uri(p_uri);
|
||||
if (peer.is_valid())
|
||||
return memnew(RemoteDebugger(peer));
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
RemoteDebugger::RemoteDebugger(Ref<RemoteDebuggerPeer> p_peer) {
|
||||
|
||||
@ -50,10 +50,10 @@ private:
|
||||
struct VisualProfiler;
|
||||
struct PerformanceProfiler;
|
||||
|
||||
NetworkProfiler *network_profiler = NULL;
|
||||
ServersProfiler *servers_profiler = NULL;
|
||||
VisualProfiler *visual_profiler = NULL;
|
||||
PerformanceProfiler *performance_profiler = NULL;
|
||||
NetworkProfiler *network_profiler = nullptr;
|
||||
ServersProfiler *servers_profiler = nullptr;
|
||||
VisualProfiler *visual_profiler = nullptr;
|
||||
PerformanceProfiler *performance_profiler = nullptr;
|
||||
|
||||
Ref<RemoteDebuggerPeer> peer;
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@ void RemoteDebuggerPeerTCP::close() {
|
||||
running = false;
|
||||
Thread::wait_to_finish(thread);
|
||||
memdelete(thread);
|
||||
thread = NULL;
|
||||
thread = nullptr;
|
||||
}
|
||||
tcp_client->disconnect_from_host();
|
||||
out_buf.resize(0);
|
||||
@ -106,7 +106,7 @@ void RemoteDebuggerPeerTCP::_write_out() {
|
||||
out_queue.pop_front();
|
||||
mutex.unlock();
|
||||
int size = 0;
|
||||
Error err = encode_variant(var, NULL, size);
|
||||
Error err = encode_variant(var, nullptr, size);
|
||||
ERR_CONTINUE(err != OK || size > out_buf.size() - 4); // 4 bytes separator.
|
||||
encode_uint32(size, buf);
|
||||
encode_variant(var, buf + 4, size);
|
||||
|
||||
@ -58,7 +58,7 @@ class RemoteDebuggerPeerTCP : public RemoteDebuggerPeer {
|
||||
private:
|
||||
Ref<StreamPeerTCP> tcp_client;
|
||||
Mutex mutex;
|
||||
Thread *thread = NULL;
|
||||
Thread *thread = nullptr;
|
||||
List<Array> in_queue;
|
||||
List<Array> out_queue;
|
||||
int out_left = 0;
|
||||
|
||||
@ -47,7 +47,7 @@ class ScriptDebugger {
|
||||
|
||||
Map<int, Set<StringName>> breakpoints;
|
||||
|
||||
ScriptLanguage *break_lang = NULL;
|
||||
ScriptLanguage *break_lang = nullptr;
|
||||
Vector<StackInfo> error_stack_info;
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user