Remove unnecessary moves / casts

This commit is contained in:
John Firebaugh
2015-04-16 12:24:14 -07:00
parent 9dbd09da15
commit 9a0005fdea
2 changed files with 4 additions and 4 deletions

View File

@@ -183,9 +183,9 @@ void SQLiteCache::put(const Resource &resource, std::shared_ptr<const Response>
// storing a new response or updating the currently stored response, potentially setting a new
// expiry date.
if (hint == Hint::Full) {
thread->invoke(&Impl::put, resource, std::move(response));
thread->invoke(&Impl::put, resource, response);
} else if (hint == Hint::Refresh) {
thread->invoke(&Impl::refresh, resource, int64_t(response->expires));
thread->invoke(&Impl::refresh, resource, response->expires);
}
}

View File

@@ -60,7 +60,7 @@ Request* DefaultFileSource::request(const Resource& resource,
// This function can be called from any thread. Make sure we're executing the actual call in the
// file source loop by sending it over the queue.
thread->invoke(&Impl::add, std::move(req), thread->get());
thread->invoke(&Impl::add, req, thread->get());
return req;
}
@@ -74,7 +74,7 @@ void DefaultFileSource::cancel(Request *req) {
// This function can be called from any thread. Make sure we're executing the actual call in the
// file source loop by sending it over the queue.
thread->invoke(&Impl::cancel, std::move(req));
thread->invoke(&Impl::cancel, req);
}
void DefaultFileSource::abort(const Environment &env) {