File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -215,8 +215,8 @@ void queue_impl::wait(const detail::code_location &CodeLoc) {
215215 vector_class<event> USMEvents;
216216 {
217217 std::lock_guard<mutex_class> Lock (MMutex);
218- Events = std::move (MEventsWeak);
219- USMEvents = std::move (MEventsShared);
218+ Events. swap (MEventsWeak);
219+ USMEvents. swap (MEventsShared);
220220 }
221221
222222 for (std::weak_ptr<event_impl> &EventImplWeakPtr : Events)
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ class queue_impl {
226226 exception_list Exceptions;
227227 {
228228 std::lock_guard<mutex_class> Lock (MMutex);
229- Exceptions = std::move ( MExceptions);
229+ std::swap (Exceptions, MExceptions);
230230 }
231231 // Unlock the mutex before calling user-provided handler to avoid
232232 // potential deadlock if the same queue is somehow referenced in the
You can’t perform that action at this time.
0 commit comments