1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-06 19:41:11 +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

@@ -71,11 +71,11 @@ String InstancePlaceholder::get_instance_path() const {
}
Node *InstancePlaceholder::create_instance(bool p_replace, const Ref<PackedScene> &p_custom_scene) {
ERR_FAIL_COND_V(!is_inside_tree(), NULL);
ERR_FAIL_COND_V(!is_inside_tree(), nullptr);
Node *base = get_parent();
if (!base)
return NULL;
return nullptr;
Ref<PackedScene> ps;
if (p_custom_scene.is_valid())
@@ -84,10 +84,10 @@ Node *InstancePlaceholder::create_instance(bool p_replace, const Ref<PackedScene
ps = ResourceLoader::load(path, "PackedScene");
if (!ps.is_valid())
return NULL;
return nullptr;
Node *scene = ps->instance();
if (!scene)
return NULL;
return nullptr;
scene->set_name(get_name());
int pos = get_position_in_parent();