From 95a1400a2ac9de1a29fa305f45b928ce8e3044bd Mon Sep 17 00:00:00 2001 From: lupoDharkael Date: Thu, 2 Apr 2020 01:20:12 +0200 Subject: Replace NULL with nullptr --- editor/debugger/editor_debugger_inspector.cpp | 6 +++--- editor/debugger/editor_debugger_node.cpp | 8 ++++---- editor/debugger/editor_debugger_node.h | 8 ++++---- editor/debugger/editor_debugger_tree.cpp | 6 +++--- editor/debugger/editor_debugger_tree.h | 4 ++-- editor/debugger/script_editor_debugger.cpp | 6 +++--- editor/debugger/script_editor_debugger.h | 4 ++-- 7 files changed, 21 insertions(+), 21 deletions(-) (limited to 'editor/debugger') diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp index 9587daf93e..00ed2bbc4c 100644 --- a/editor/debugger/editor_debugger_inspector.cpp +++ b/editor/debugger/editor_debugger_inspector.cpp @@ -125,7 +125,7 @@ void EditorDebuggerInspector::_object_selected(ObjectID p_object) { } ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) { - EditorDebuggerRemoteObject *debugObj = NULL; + EditorDebuggerRemoteObject *debugObj = nullptr; SceneDebuggerObject obj; obj.deserialize(p_arr); @@ -211,7 +211,7 @@ void EditorDebuggerInspector::clear_cache() { for (Map::Element *E = remote_objects.front(); E; E = E->next()) { EditorNode *editor = EditorNode::get_singleton(); if (editor->get_editor_history()->get_current() == E->value()->get_instance_id()) { - editor->push_item(NULL); + editor->push_item(nullptr); } memdelete(E->value()); } @@ -221,7 +221,7 @@ void EditorDebuggerInspector::clear_cache() { Object *EditorDebuggerInspector::get_object(ObjectID p_id) { if (remote_objects.has(p_id)) return remote_objects[p_id]; - return NULL; + return nullptr; } void EditorDebuggerInspector::add_stack_variable(const Array &p_array) { diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp index 5c9b977247..3302b50103 100644 --- a/editor/debugger/editor_debugger_node.cpp +++ b/editor/debugger/editor_debugger_node.cpp @@ -47,7 +47,7 @@ void _for_all(TabContainer *p_node, const Func &p_func) { } } -EditorDebuggerNode *EditorDebuggerNode::singleton = NULL; +EditorDebuggerNode *EditorDebuggerNode::singleton = nullptr; EditorDebuggerNode::EditorDebuggerNode() { if (!singleton) @@ -291,13 +291,13 @@ void EditorDebuggerNode::_notification(int p_what) { // Take connections. if (server->is_connection_available()) { - ScriptEditorDebugger *debugger = NULL; + ScriptEditorDebugger *debugger = nullptr; _for_all(tabs, [&](ScriptEditorDebugger *dbg) { if (debugger || dbg->is_session_active()) return; debugger = dbg; }); - if (debugger == NULL) { + if (debugger == nullptr) { if (tabs->get_tab_count() <= 4) { // Max 4 debugging sessions active. debugger = _add_debugger(); } else { @@ -356,7 +356,7 @@ void EditorDebuggerNode::_debugger_changed(int p_tab) { if (get_inspected_remote_object()) { // Clear inspected object, you can only inspect objects in selected debugger. // Hopefully, in the future, we will have one inspector per debugger. - EditorNode::get_singleton()->push_item(NULL); + EditorNode::get_singleton()->push_item(nullptr); } if (remote_scene_tree->is_visible_in_tree()) { get_current_debugger()->request_remote_tree(); diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h index 6181ccdb5f..9467442c9a 100644 --- a/editor/debugger/editor_debugger_node.h +++ b/editor/debugger/editor_debugger_node.h @@ -85,9 +85,9 @@ private: }; Ref server; - TabContainer *tabs = NULL; - Button *debugger_button = NULL; - MenuButton *script_menu = NULL; + TabContainer *tabs = nullptr; + Button *debugger_button = nullptr; + MenuButton *script_menu = nullptr; Ref