Merge pull request #40913 from godotengine/localv

Fixes issue with LocalVector remove function
This commit is contained in:
Rémi Verschelde 2020-07-31 14:03:59 +02:00 committed by GitHub
commit 4fb0ae3e9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,10 +73,10 @@ public:
void remove(U p_index) {
ERR_FAIL_UNSIGNED_INDEX(p_index, count);
count--;
for (U i = p_index; i < count; i++) {
data[i] = data[i + 1];
}
count--;
if (!__has_trivial_destructor(T) && !force_trivial) {
data[count].~T();
}