Removed a redundant check in PoolVector
The set method of PoolVector<T> performs an indexing check twice.
This commit is contained in:
parent
44db85d6f6
commit
ff348e48f9
1 changed files with 1 additions and 3 deletions
|
@ -488,9 +488,7 @@ T PoolVector<T>::get(int p_index) const {
|
||||||
template <class T>
|
template <class T>
|
||||||
void PoolVector<T>::set(int p_index, const T &p_val) {
|
void PoolVector<T>::set(int p_index, const T &p_val) {
|
||||||
|
|
||||||
if (p_index < 0 || p_index >= size()) {
|
ERR_FAIL_INDEX(p_index, size());
|
||||||
ERR_FAIL_COND(p_index < 0 || p_index >= size());
|
|
||||||
}
|
|
||||||
|
|
||||||
Write w = write();
|
Write w = write();
|
||||||
w[p_index] = p_val;
|
w[p_index] = p_val;
|
||||||
|
|
Loading…
Reference in a new issue