diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-09 16:11:33 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-11 19:45:49 +0200 |
commit | 893f889d74b35bb7330c3ff3d0187042770a4490 (patch) | |
tree | b1435faf6380670ffc4a878d0cdcb29a0527f5a7 /core/math | |
parent | 221884e6bc260c38f16422081b7d4efd49a71375 (diff) | |
download | redot-engine-893f889d74b35bb7330c3ff3d0187042770a4490.tar.gz |
[Core] Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'core/math')
-rw-r--r-- | core/math/disjoint_set.h | 2 | ||||
-rw-r--r-- | core/math/dynamic_bvh.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/math/disjoint_set.h b/core/math/disjoint_set.h index 78ae77e72c..2ece991fea 100644 --- a/core/math/disjoint_set.h +++ b/core/math/disjoint_set.h @@ -134,7 +134,7 @@ void DisjointSet<T, H, C, AL>::get_representatives(Vector<T> &out_representative template <typename T, class H, class C, class AL> void DisjointSet<T, H, C, AL>::get_members(Vector<T> &out_members, T representative) { typename MapT::Iterator rep_itr = elements.find(representative); - ERR_FAIL_COND(rep_itr == nullptr); + ERR_FAIL_NULL(rep_itr); Element *rep_element = rep_itr->value; ERR_FAIL_COND(rep_element->parent != rep_element); diff --git a/core/math/dynamic_bvh.h b/core/math/dynamic_bvh.h index 21b5340aaa..dbc1cb31de 100644 --- a/core/math/dynamic_bvh.h +++ b/core/math/dynamic_bvh.h @@ -190,7 +190,7 @@ private: _FORCE_INLINE_ bool is_internal() const { return (!is_leaf()); } _FORCE_INLINE_ int get_index_in_parent() const { - ERR_FAIL_COND_V(!parent, 0); + ERR_FAIL_NULL_V(parent, 0); return (parent->children[1] == this) ? 1 : 0; } void get_max_depth(int depth, int &maxdepth) { |