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

@ -1100,7 +1100,7 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
}
} else if (owner) {
Node *node = NULL;
Node *node = nullptr;
if (owner->is_class("Node"))
node = Object::cast_to<Node>(owner);
@ -1411,7 +1411,7 @@ void CustomPropertyEditor::_modified(String p_string) {
v = value_editor[0]->get_text().to_int();
return;
} else {
v = expr->execute(Array(), NULL, false);
v = expr->execute(Array(), nullptr, false);
}
emit_signal("variant_changed");
@ -1563,7 +1563,7 @@ real_t CustomPropertyEditor::_parse_real_expression(String text) {
if (err != OK) {
out = value_editor[0]->get_text().to_double();
} else {
out = expr->execute(Array(), NULL, false);
out = expr->execute(Array(), nullptr, false);
}
return out;
}
@ -1778,7 +1778,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
action_buttons[i]->set_flat(true);
}
color_picker = NULL;
color_picker = nullptr;
set_as_toplevel(true);
file = memnew(EditorFileDialog);
@ -1818,7 +1818,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
add_child(menu);
menu->connect("id_pressed", this, "_menu_option");
evaluator = NULL;
evaluator = nullptr;
spinbox = memnew(SpinBox);
add_child(spinbox);
@ -1830,6 +1830,6 @@ CustomPropertyEditor::CustomPropertyEditor() {
slider->set_anchors_and_margins_preset(Control::PRESET_WIDE, Control::PRESET_MODE_MINSIZE, 5);
slider->connect("value_changed", this, "_range_modified");
create_dialog = NULL;
property_select = NULL;
create_dialog = nullptr;
property_select = nullptr;
}