From ff348e48f971df384a56ae47d4a4f4a5c78e45c1 Mon Sep 17 00:00:00 2001 From: hbina085 Date: Sat, 6 Jul 2019 20:43:34 -0400 Subject: Removed a redundant check in PoolVector The set method of PoolVector performs an indexing check twice. --- core/pool_vector.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'core') 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::get(int p_index) const { template void PoolVector::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; -- cgit v1.2.3