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

@@ -618,7 +618,7 @@ void EditorAssetLibrary::_install_asset() {
for (int i = 0; i < downloads_hb->get_child_count(); i++) {
EditorAssetLibraryItemDownload *d = Object::cast_to<EditorAssetLibraryItemDownload>(downloads_hb->get_child(i));
if (d && d->get_asset_id() == description->get_asset_id()) {
if (EditorNode::get_singleton() != NULL)
if (EditorNode::get_singleton() != nullptr)
EditorNode::get_singleton()->show_warning(TTR("Download for this asset is already in progress!"));
return;
}
@@ -1265,7 +1265,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
void EditorAssetLibrary::_asset_file_selected(const String &p_file) {
if (asset_installer) {
memdelete(asset_installer);
asset_installer = NULL;
asset_installer = nullptr;
}
asset_installer = memnew(EditorAssetInstaller);
@@ -1474,7 +1474,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
error_tr->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
error_hb->add_child(error_tr);
description = NULL;
description = nullptr;
set_process(true);
@@ -1493,7 +1493,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
add_child(asset_open);
asset_open->connect("file_selected", this, "_asset_file_selected");
asset_installer = NULL;
asset_installer = nullptr;
}
///////