mirror of
https://github.com/PixlOne/logiops.git
synced 2025-07-16 14:22:35 +08:00
Fix EventHandlerList move assignment
This commit is contained in:
parent
47e4ba2b44
commit
1ff386a4bf
@ -67,9 +67,16 @@ public:
|
||||
EventHandlerLock& operator=(const EventHandlerLock&) = delete;
|
||||
|
||||
EventHandlerLock& operator=(EventHandlerLock&& o) noexcept {
|
||||
this->_list = o._list;
|
||||
this->_iterator = o._iterator;
|
||||
o._list.reset();
|
||||
if (this != &o) {
|
||||
if (auto list = _list.lock()) {
|
||||
this->_list.reset();
|
||||
list->remove(_iterator);
|
||||
}
|
||||
|
||||
this->_list = o._list;
|
||||
o._list.reset();
|
||||
this->_iterator = o._iterator;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user