ams: prefer construct_at/destroy_at over placement new/explicit destructor

This commit is contained in:
Michael Scire committed 2021-03-21 20:30:40 -07:00
1 parent aff0da9427
commit d84dcb653d
49 files changed
+217 -171

No files matched your search

@@ -216,7 +216,7 @@ namespace ams::kern {
T *Allocate() {
T *obj = reinterpret_cast<T *>(this->AllocateImpl());
if (AMS_LIKELY(obj != nullptr)) {
new (obj) T();
std::construct_at(obj);
}
return obj;
}