mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-05 01:03:43 -04:00
cs: fix allocator aborts
This commit is contained in:
parent
ebb0bd2b41
commit
8acf0a4fa9
4 changed files with 51 additions and 7 deletions
|
@ -84,11 +84,17 @@ namespace ams::pgl {
|
|||
class EventObserver {
|
||||
NON_COPYABLE(EventObserver);
|
||||
private:
|
||||
std::unique_ptr<impl::EventObserverInterface> m_impl;
|
||||
struct Deleter {
|
||||
void operator()(impl::EventObserverInterface *);
|
||||
};
|
||||
public:
|
||||
using UniquePtr = std::unique_ptr<impl::EventObserverInterface, Deleter>;
|
||||
private:
|
||||
UniquePtr m_impl;
|
||||
public:
|
||||
EventObserver() { /* ... */ }
|
||||
|
||||
explicit EventObserver(std::unique_ptr<impl::EventObserverInterface> impl) : m_impl(std::move(impl)) { /* ... */ }
|
||||
explicit EventObserver(UniquePtr impl) : m_impl(std::move(impl)) { /* ... */ }
|
||||
|
||||
EventObserver(EventObserver &&rhs) {
|
||||
m_impl = std::move(rhs.m_impl);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue