summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-07-08 08:31:14 +0200
committerGitHub <noreply@github.com>2019-07-08 08:31:14 +0200
commit74b00d1beafb31e8cf3ca4f7bf35118232662d45 (patch)
tree4beb5cb42360249bb8f35f685dc3f5fb335371ef /core
parent1d5c067215e93b4d63ebc4bc294e9b62b30334b8 (diff)
parentff348e48f971df384a56ae47d4a4f4a5c78e45c1 (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.h4
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;