1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

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

@@ -51,7 +51,7 @@ void Path2DEditor::_notification(int p_what) {
}
void Path2DEditor::_node_removed(Node *p_node) {
if (p_node == node) {
node = NULL;
node = nullptr;
hide();
}
}
@@ -268,7 +268,7 @@ bool Path2DEditor::forward_gui_input(const Ref<InputEvent> &p_event) {
Vector2 gpoint = mm->get_position();
Ref<Curve2D> curve = node->get_curve();
if (curve == NULL)
if (curve == nullptr)
return true;
if (curve->get_point_count() < 2)
return true;
@@ -426,7 +426,7 @@ void Path2DEditor::edit(Node *p_path2d) {
// node may have been deleted at this point
if (node && node->is_connected("visibility_changed", this, "_node_visibility_changed"))
node->disconnect("visibility_changed", this, "_node_visibility_changed");
node = NULL;
node = nullptr;
}
}
@@ -503,7 +503,7 @@ void Path2DEditor::_handle_option_pressed(int p_option) {
}
Path2DEditor::Path2DEditor(EditorNode *p_editor) {
canvas_item_editor = NULL;
canvas_item_editor = nullptr;
editor = p_editor;
undo_redo = editor->get_undo_redo();
mirror_handle_angle = true;
@@ -587,7 +587,7 @@ void Path2DEditorPlugin::make_visible(bool p_visible) {
} else {
path2d_editor->hide();
path2d_editor->base_hb->hide();
path2d_editor->edit(NULL);
path2d_editor->edit(nullptr);
}
}