diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-12 12:02:02 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-09-12 12:02:02 +0200 |
commit | cc61c9d63d947b12b45a671c657e568cdcbd2bad (patch) | |
tree | aa42727334245a6a264aaaf83a1564f6219083f1 /core/string/node_path.cpp | |
parent | 38ca83e16f09ff977e5197e103c73168a0b5de70 (diff) | |
parent | 893f889d74b35bb7330c3ff3d0187042770a4490 (diff) | |
download | redot-engine-cc61c9d63d947b12b45a671c657e568cdcbd2bad.tar.gz |
Merge pull request #81487 from AThousandShips/null_check_core
[Core] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'core/string/node_path.cpp')
-rw-r--r-- | core/string/node_path.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/string/node_path.cpp b/core/string/node_path.cpp index af7c18741d..32e4564c5e 100644 --- a/core/string/node_path.cpp +++ b/core/string/node_path.cpp @@ -73,7 +73,7 @@ int NodePath::get_name_count() const { } StringName NodePath::get_name(int p_idx) const { - ERR_FAIL_COND_V(!data, StringName()); + ERR_FAIL_NULL_V(data, StringName()); ERR_FAIL_INDEX_V(p_idx, data->path.size(), StringName()); return data->path[p_idx]; } @@ -87,7 +87,7 @@ int NodePath::get_subname_count() const { } StringName NodePath::get_subname(int p_idx) const { - ERR_FAIL_COND_V(!data, StringName()); + ERR_FAIL_NULL_V(data, StringName()); ERR_FAIL_INDEX_V(p_idx, data->subpath.size(), StringName()); return data->subpath[p_idx]; } @@ -200,7 +200,7 @@ Vector<StringName> NodePath::get_subnames() const { } StringName NodePath::get_concatenated_names() const { - ERR_FAIL_COND_V(!data, StringName()); + ERR_FAIL_NULL_V(data, StringName()); if (!data->concatenated_path) { int pc = data->path.size(); @@ -215,7 +215,7 @@ StringName NodePath::get_concatenated_names() const { } StringName NodePath::get_concatenated_subnames() const { - ERR_FAIL_COND_V(!data, StringName()); + ERR_FAIL_NULL_V(data, StringName()); if (!data->concatenated_subpath) { int spc = data->subpath.size(); |