ams: prefer construct_at/destroy_at over placement new/explicit destructor
This commit is contained in:
1 parent
aff0da9427
commit
d84dcb653d
49 files changed
+217
-171
No files matched your search
@@ -68,7 +68,7 @@ namespace ams::mem {
|
||||
|
||||
StandardAllocator::StandardAllocator() : initialized(false), enable_thread_cache(false), unused(0) {
|
||||
static_assert(sizeof(impl::heap::CentralHeap) <= sizeof(this->central_heap_storage));
|
||||
new (std::addressof(this->central_heap_storage)) impl::heap::CentralHeap;
|
||||
std::construct_at(GetCentral(this->central_heap_storage));
|
||||
}
|
||||
|
||||
StandardAllocator::StandardAllocator(void *mem, size_t size) : StandardAllocator() {
|
||||
|
||||
Reference in new issue
Block a user