Replace NULL with nullptr

This commit is contained in:
lupoDharkael 2020-04-02 01:20:12 +02:00
parent 5f11e15571
commit 95a1400a2a
755 changed files with 5742 additions and 5742 deletions

View file

@ -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<ObjectID, EditorDebuggerRemoteObject *>::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) {

View file

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

View file

@ -85,9 +85,9 @@ private:
};
Ref<EditorDebuggerServer> server;
TabContainer *tabs = NULL;
Button *debugger_button = NULL;
MenuButton *script_menu = NULL;
TabContainer *tabs = nullptr;
Button *debugger_button = nullptr;
MenuButton *script_menu = nullptr;
Ref<Script> stack_script; // Why?!?
@ -95,7 +95,7 @@ private:
int last_warning_count = 0;
float inspect_edited_object_timeout = 0;
EditorDebuggerTree *remote_scene_tree = NULL;
EditorDebuggerTree *remote_scene_tree = nullptr;
float remote_scene_tree_timeout = 0.0;
bool auto_switch_remote_scene_tree = false;
bool debug_with_external_editor = false;

View file

@ -135,7 +135,7 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
// Nodes are in a flatten list, depth first. Use a stack of parents, avoid recursion.
List<Pair<TreeItem *, int>> parents;
for (int i = 0; i < p_tree->nodes.size(); i++) {
TreeItem *parent = NULL;
TreeItem *parent = nullptr;
if (parents.size()) { // Find last parent.
Pair<TreeItem *, int> &p = parents[0];
parent = p.first;
@ -191,7 +191,7 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
// Check if parent expects more children.
for (int j = 0; j < parents.size(); j++) {
if (parents[j].first == item) {
parent = NULL;
parent = nullptr;
break; // Might have more children.
}
}
@ -211,7 +211,7 @@ String EditorDebuggerTree::get_selected_path() {
String EditorDebuggerTree::_get_path(TreeItem *p_item) {
ERR_FAIL_COND_V(!p_item, "");
if (p_item->get_parent() == NULL) {
if (p_item->get_parent() == nullptr) {
return "/root";
}
String text = p_item->get_text(0);

View file

@ -50,8 +50,8 @@ private:
int debugger_id = 0;
bool updating_scene_tree = false;
Set<ObjectID> unfold_cache;
PopupMenu *item_menu = NULL;
EditorFileDialog *file_dialog = NULL;
PopupMenu *item_menu = nullptr;
EditorFileDialog *file_dialog = nullptr;
String _get_path(TreeItem *p_item);
void _scene_tree_folded(Object *p_obj);

View file

@ -138,7 +138,7 @@ void ScriptEditorDebugger::update_tabs() {
}
void ScriptEditorDebugger::clear_style() {
tabs->add_theme_style_override("panel", NULL);
tabs->add_theme_style_override("panel", nullptr);
}
void ScriptEditorDebugger::save_node(ObjectID p_id, const String &p_file) {
@ -923,7 +923,7 @@ void ScriptEditorDebugger::stop() {
res_path_cache.clear();
profiler_signature.clear();
inspector->edit(NULL);
inspector->edit(nullptr);
_update_buttons_state();
}
@ -973,7 +973,7 @@ void ScriptEditorDebugger::_stack_dump_frame_selected() {
msg.push_back(frame);
_put_msg("get_stack_frame_vars", msg);
} else {
inspector->edit(NULL);
inspector->edit(nullptr);
}
}

View file

@ -107,7 +107,7 @@ private:
Button *docontinue;
// Reference to "Remote" tab in scene tree. Needed by _live_edit_set and buttons state.
// Each debugger should have it's tree in the future I guess.
const Tree *editor_remote_tree = NULL;
const Tree *editor_remote_tree = nullptr;
List<Vector<float>> perf_history;
Vector<float> perf_max;
@ -255,7 +255,7 @@ public:
bool is_skip_breakpoints();
virtual Size2 get_minimum_size() const;
ScriptEditorDebugger(EditorNode *p_editor = NULL);
ScriptEditorDebugger(EditorNode *p_editor = nullptr);
~ScriptEditorDebugger();
};