summaryrefslogtreecommitdiff
path: root/thirdparty/embree/common/sys/vector.h
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/embree/common/sys/vector.h')
-rw-r--r--thirdparty/embree/common/sys/vector.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/thirdparty/embree/common/sys/vector.h b/thirdparty/embree/common/sys/vector.h
index f832626789..d05e1deb18 100644
--- a/thirdparty/embree/common/sys/vector.h
+++ b/thirdparty/embree/common/sys/vector.h
@@ -127,14 +127,15 @@ namespace embree
{
assert(!empty());
size_active--;
- alloc.destroy(&items[size_active]);
+ items[size_active].~T();
}
__forceinline void clear()
{
/* destroy elements */
- for (size_t i=0; i<size_active; i++)
- alloc.destroy(&items[i]);
+ for (size_t i=0; i<size_active; i++){
+ items[i].~T();
+ }
/* free memory */
alloc.deallocate(items,size_alloced);
@@ -178,8 +179,9 @@ namespace embree
/* destroy elements */
if (new_active < size_active)
{
- for (size_t i=new_active; i<size_active; i++)
- alloc.destroy(&items[i]);
+ for (size_t i=new_active; i<size_active; i++){
+ items[i].~T();
+ }
size_active = new_active;
}
@@ -195,7 +197,7 @@ namespace embree
items = alloc.allocate(new_alloced);
for (size_t i=0; i<size_active; i++) {
::new (&items[i]) T(std::move(old_items[i]));
- alloc.destroy(&old_items[i]);
+ old_items[i].~T();
}
for (size_t i=size_active; i<new_active; i++) {