Skip to content

Commit

Permalink
Change CRASH_COND to ERR_FAIL in Cowdata::set
Browse files Browse the repository at this point in the history
  • Loading branch information
qarmin committed Feb 24, 2021
1 parent 4cdd222 commit bb6ece1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/templates/cowdata.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class CowData {
_FORCE_INLINE_ bool is_empty() const { return _ptr == nullptr; }

_FORCE_INLINE_ void set(int p_index, const T &p_elem) {
CRASH_BAD_INDEX(p_index, size());
ERR_FAIL_INDEX(p_index, size());
_copy_on_write();
_get_data()[p_index] = p_elem;
}
Expand Down

0 comments on commit bb6ece1

Please sign in to comment.