[Core] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable

This commit is contained in:
A Thousand Ships 2023-09-09 16:11:33 +02:00
parent 221884e6bc
commit 893f889d74
44 changed files with 152 additions and 152 deletions

View file

@ -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();