File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ event_impl::event_impl(const QueueImplPtr &Queue)
192
192
}
193
193
194
194
void event_impl::setQueue (queue_impl &Queue) {
195
- MQueue = Queue.shared_from_this ();
195
+ MQueue = Queue.weak_from_this ();
196
196
MIsProfilingEnabled = Queue.MIsProfilingEnabled ;
197
197
198
198
// TODO After setting the queue, the event is no longer default
@@ -202,9 +202,9 @@ void event_impl::setQueue(queue_impl &Queue) {
202
202
}
203
203
204
204
void event_impl::setSubmittedQueue (std::weak_ptr<queue_impl> SubmittedQueue) {
205
- MSubmittedQueue = SubmittedQueue;
205
+ MSubmittedQueue = std::move ( SubmittedQueue) ;
206
206
if (MHostProfilingInfo) {
207
- if (auto QueuePtr = SubmittedQueue .lock ()) {
207
+ if (auto QueuePtr = MSubmittedQueue .lock ()) {
208
208
device_impl &Device = QueuePtr->getDeviceImpl ();
209
209
MHostProfilingInfo->setDevice (&Device);
210
210
}
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ class event_impl {
235
235
// /
236
236
// / @return
237
237
void setWorkerQueue (std::weak_ptr<queue_impl> WorkerQueue) {
238
- MWorkerQueue = WorkerQueue;
238
+ MWorkerQueue = std::move ( WorkerQueue) ;
239
239
};
240
240
241
241
// / Sets original queue used for submission.
You can’t perform that action at this time.
0 commit comments