Merge pull request #30392 from hbina/redundant_check_pool_vector

Removed a redundant check in PoolVector
This commit is contained in:
Rémi Verschelde 2019-07-08 08:31:14 +02:00 committed by GitHub
commit 74b00d1bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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