diff options
Diffstat (limited to 'editor/editor_data.cpp')
-rw-r--r-- | editor/editor_data.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index 1c19327da7..942b4a8ee6 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -270,7 +270,7 @@ EditorPlugin *EditorData::get_editor(Object *p_object) { return editor_plugins[i]; } - return NULL; + return nullptr; } EditorPlugin *EditorData::get_subeditor(Object *p_object) { @@ -281,7 +281,7 @@ EditorPlugin *EditorData::get_subeditor(Object *p_object) { return editor_plugins[i]; } - return NULL; + return nullptr; } Vector<EditorPlugin *> EditorData::get_subeditors(Object *p_object) { @@ -302,7 +302,7 @@ EditorPlugin *EditorData::get_editor(String p_name) { return editor_plugins[i]; } - return NULL; + return nullptr; } void EditorData::copy_object_params(Object *p_object) { @@ -464,7 +464,7 @@ UndoRedo &EditorData::get_undo_redo() { void EditorData::remove_editor_plugin(EditorPlugin *p_plugin) { - p_plugin->undo_redo = NULL; + p_plugin->undo_redo = nullptr; editor_plugins.erase(p_plugin); } @@ -479,7 +479,7 @@ int EditorData::get_editor_plugin_count() const { } EditorPlugin *EditorData::get_editor_plugin(int p_idx) { - ERR_FAIL_INDEX_V(p_idx, editor_plugins.size(), NULL); + ERR_FAIL_INDEX_V(p_idx, editor_plugins.size(), nullptr); return editor_plugins[p_idx]; } @@ -506,7 +506,7 @@ Object *EditorData::instance_custom_type(const String &p_type, const String &p_i Ref<Script> script = get_custom_types()[p_inherits][i].script; Object *ob = ClassDB::instance(p_inherits); - ERR_FAIL_COND_V(!ob, NULL); + ERR_FAIL_COND_V(!ob, nullptr); if (ob->is_class("Node")) { ob->call("set_name", p_type); } @@ -516,7 +516,7 @@ Object *EditorData::instance_custom_type(const String &p_type, const String &p_i } } - return NULL; + return nullptr; } void EditorData::remove_custom_type(const String &p_type) { @@ -540,7 +540,7 @@ int EditorData::add_edited_scene(int p_at_pos) { if (p_at_pos < 0) p_at_pos = edited_scene.size(); EditedScene es; - es.root = NULL; + es.root = nullptr; es.path = String(); es.history_current = -1; es.version = 0; @@ -680,10 +680,10 @@ void EditorData::set_edited_scene(int p_idx) { } Node *EditorData::get_edited_scene_root(int p_idx) { if (p_idx < 0) { - ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), NULL); + ERR_FAIL_INDEX_V(current_edited_scene, edited_scene.size(), nullptr); return edited_scene[current_edited_scene].root; } else { - ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), NULL); + ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), nullptr); return edited_scene[p_idx].root; } } @@ -915,7 +915,7 @@ Object *EditorData::script_class_instance(const String &p_class) { return obj; } } - return NULL; + return nullptr; } Ref<Script> EditorData::script_class_load_script(const String &p_class) const { @@ -1018,7 +1018,7 @@ void EditorSelection::add_node(Node *p_node) { changed = true; nl_changed = true; - Object *meta = NULL; + Object *meta = nullptr; for (List<Object *>::Element *E = editor_plugins.front(); E; E = E->next()) { meta = E->get()->call("_get_editor_data", p_node); |