aboutsummaryrefslogtreecommitdiffstats
path: root/core/context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/context.cpp')
-rw-r--r--core/context.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/core/context.cpp b/core/context.cpp
index d68d8327..2ebbc7b1 100644
--- a/core/context.cpp
+++ b/core/context.cpp
@@ -2,7 +2,10 @@
#include "config.h"
#include <cassert>
+#include <limits>
#include <memory>
+#include <stdexcept>
+#include <utility>
#include "async_event.h"
#include "context.h"
@@ -51,7 +54,7 @@ ContextBase::~ContextBase()
if(EffectSlotArray *curarray{mActiveAuxSlots.exchange(nullptr, std::memory_order_relaxed)})
{
- al::destroy_n(curarray->end(), curarray->size());
+ std::destroy_n(curarray->end(), curarray->size());
delete curarray;
}
@@ -63,12 +66,14 @@ ContextBase::~ContextBase()
auto evt_vec = mAsyncEvents->getReadVector();
if(evt_vec.first.len > 0)
{
- al::destroy_n(reinterpret_cast<AsyncEvent*>(evt_vec.first.buf), evt_vec.first.len);
+ std::destroy_n(std::launder(reinterpret_cast<AsyncEvent*>(evt_vec.first.buf)),
+ evt_vec.first.len);
count += evt_vec.first.len;
}
if(evt_vec.second.len > 0)
{
- al::destroy_n(reinterpret_cast<AsyncEvent*>(evt_vec.second.buf), evt_vec.second.len);
+ std::destroy_n(std::launder(reinterpret_cast<AsyncEvent*>(evt_vec.second.buf)),
+ evt_vec.second.len);
count += evt_vec.second.len;
}
if(count > 0)