Style: Replaces uses of 0/NULL by nullptr (C++11)

Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
This commit is contained in:
Rémi Verschelde
2021-05-04 16:00:45 +02:00
parent 2b429b24b5
commit a828398655
633 changed files with 4454 additions and 4410 deletions

View File

@@ -165,8 +165,8 @@ EditorPropertyMultilineText::EditorPropertyMultilineText() {
open_big_text = memnew(ToolButton);
open_big_text->connect("pressed", this, "_open_big_text");
hb->add_child(open_big_text);
big_text_dialog = NULL;
big_text = NULL;
big_text_dialog = nullptr;
big_text = nullptr;
}
///////////////////// TEXT ENUM /////////////////////////
@@ -291,7 +291,7 @@ EditorPropertyPath::EditorPropertyPath() {
path_edit->set_clip_text(true);
path_hb->add_child(path_edit);
add_focusable(path);
dialog = NULL;
dialog = nullptr;
path_edit->connect("pressed", this, "_path_pressed");
folder = false;
global = false;
@@ -427,7 +427,7 @@ void EditorPropertyMember::_bind_methods() {
}
EditorPropertyMember::EditorPropertyMember() {
selector = NULL;
selector = nullptr;
property = memnew(Button);
property->set_clip_text(true);
add_child(property);
@@ -1910,7 +1910,7 @@ EditorPropertyColor::EditorPropertyColor() {
void EditorPropertyNodePath::_node_selected(const NodePath &p_path) {
NodePath path = p_path;
Node *base_node = NULL;
Node *base_node = nullptr;
if (!use_path_from_scene_root) {
base_node = Object::cast_to<Node>(get_edited_object());
@@ -1971,7 +1971,7 @@ void EditorPropertyNodePath::update_property() {
}
assign->set_flat(true);
Node *base_node = NULL;
Node *base_node = nullptr;
if (base_hint != NodePath()) {
if (get_tree()->get_root()->has_node(base_hint)) {
base_node = get_tree()->get_root()->get_node(base_hint);
@@ -2034,7 +2034,7 @@ EditorPropertyNodePath::EditorPropertyNodePath() {
hbc->add_child(clear);
use_path_from_scene_root = false;
scene_tree = NULL; //do not allocate unnecessarily
scene_tree = nullptr; //do not allocate unnecessarily
}
///////////////////// RID /////////////////////////
@@ -2625,10 +2625,10 @@ void EditorPropertyResource::update_property() {
sub_inspector->refresh();
} else {
if (sub_inspector) {
set_bottom_editor(NULL);
set_bottom_editor(nullptr);
memdelete(sub_inspector_vbox);
sub_inspector = NULL;
sub_inspector_vbox = NULL;
sub_inspector = nullptr;
sub_inspector_vbox = nullptr;
if (opened_editor) {
EditorNode::get_singleton()->hide_top_editors();
opened_editor = false;
@@ -2862,8 +2862,8 @@ void EditorPropertyResource::_bind_methods() {
EditorPropertyResource::EditorPropertyResource() {
opened_editor = false;
sub_inspector = NULL;
sub_inspector_vbox = NULL;
sub_inspector = nullptr;
sub_inspector_vbox = nullptr;
use_sub_inspector = bool(EDITOR_GET("interface/inspector/open_resources_in_current_inspector"));
HBoxContainer *hbc = memnew(HBoxContainer);
@@ -2899,8 +2899,8 @@ EditorPropertyResource::EditorPropertyResource() {
edit->connect("gui_input", this, "_button_input");
add_focusable(edit);
file = NULL;
scene_tree = NULL;
file = nullptr;
scene_tree = nullptr;
dropping = false;
add_to_group("_editor_resource_properties");