diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-07-08 08:31:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-08 08:31:14 +0200 |
commit | 74b00d1beafb31e8cf3ca4f7bf35118232662d45 (patch) | |
tree | 4beb5cb42360249bb8f35f685dc3f5fb335371ef /core | |
parent | 1d5c067215e93b4d63ebc4bc294e9b62b30334b8 (diff) | |
parent | ff348e48f971df384a56ae47d4a4f4a5c78e45c1 (diff) |
Merge pull request #30392 from hbina/redundant_check_pool_vector
Removed a redundant check in PoolVector
Diffstat (limited to 'core')
-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; |