From 894da2e214d4a63321a8e88e098392594484ef31 Mon Sep 17 00:00:00 2001 From: "michal.szwaj" Date: Tue, 17 Jul 2018 16:06:56 +0200 Subject: [PATCH] Self can be moved --- src/USB/USBEndpoint.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/USB/USBEndpoint.cpp b/src/USB/USBEndpoint.cpp index 128d78c..541dfef 100644 --- a/src/USB/USBEndpoint.cpp +++ b/src/USB/USBEndpoint.cpp @@ -108,7 +108,7 @@ void USBEndpoint::transfer(libusb_transfer *transfer, Promise::Pointer promise) // guarantee that endpoint will live until all transfers are finished if(self_ == nullptr) { - self_ = self; + self_ = std::move(self); } transfers_.insert(std::make_pair(transfer, std::move(promise)));