Fixes issue with LocalVector remove function
This commit is contained in:
parent
8b28553de8
commit
9fb587b702
1 changed files with 1 additions and 1 deletions
|
@ -73,10 +73,10 @@ public:
|
||||||
|
|
||||||
void remove(U p_index) {
|
void remove(U p_index) {
|
||||||
ERR_FAIL_UNSIGNED_INDEX(p_index, count);
|
ERR_FAIL_UNSIGNED_INDEX(p_index, count);
|
||||||
|
count--;
|
||||||
for (U i = p_index; i < count; i++) {
|
for (U i = p_index; i < count; i++) {
|
||||||
data[i] = data[i + 1];
|
data[i] = data[i + 1];
|
||||||
}
|
}
|
||||||
count--;
|
|
||||||
if (!__has_trivial_destructor(T) && !force_trivial) {
|
if (!__has_trivial_destructor(T) && !force_trivial) {
|
||||||
data[count].~T();
|
data[count].~T();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue