1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +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

@@ -35,7 +35,7 @@
#include "editor/editor_node.h"
#include "editor/editor_scale.h"
VersionControlEditorPlugin *VersionControlEditorPlugin::singleton = NULL;
VersionControlEditorPlugin *VersionControlEditorPlugin::singleton = nullptr;
void VersionControlEditorPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("_selected_a_vcs"), &VersionControlEditorPlugin::_selected_a_vcs);
@@ -156,7 +156,7 @@ void VersionControlEditorPlugin::_refresh_stage_area() {
String file_path;
for (int i = 0; i < modified_file_paths.size(); i++) {
file_path = modified_file_paths.get_key_at_index(i);
TreeItem *found = stage_files->search_item_text(file_path, 0, true);
TreeItem *found = stage_files->search_item_text(file_path, nullptr, true);
if (!found) {
ChangeType change_index = (ChangeType)(int)modified_file_paths.get_value_at_index(i);
String change_text = file_path + " (" + change_type_to_strings[change_index] + ")";
@@ -338,7 +338,7 @@ void VersionControlEditorPlugin::shut_down() {
}
EditorVCSInterface::get_singleton()->shut_down();
memdelete(EditorVCSInterface::get_singleton());
EditorVCSInterface::set_singleton(NULL);
EditorVCSInterface::set_singleton(nullptr);
EditorNode::get_singleton()->remove_control_from_dock(version_commit_dock);
EditorNode::get_singleton()->remove_bottom_panel_item(version_control_dock);
@@ -389,7 +389,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
set_up_choice->connect("item_selected", this, "_selected_a_vcs");
set_up_hbc->add_child(set_up_choice);
set_up_init_settings = NULL;
set_up_init_settings = nullptr;
set_up_init_button = memnew(Button);
set_up_init_button->set_text(TTR("Initialize"));