diff options
Diffstat (limited to 'core/pool_vector.h')
-rw-r--r-- | core/pool_vector.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/pool_vector.h b/core/pool_vector.h index aba66e3909..98a52c6938 100644 --- a/core/pool_vector.h +++ b/core/pool_vector.h @@ -488,9 +488,7 @@ T PoolVector<T>::get(int p_index) const { template <class T> void PoolVector<T>::set(int p_index, const T &p_val) { - if (p_index < 0 || p_index >= size()) { - ERR_FAIL_COND(p_index < 0 || p_index >= size()); - } + ERR_FAIL_INDEX(p_index, size()); Write w = write(); w[p_index] = p_val; |