fix coverity scan issue (#20678)

This commit is contained in:
Fang Xu 2023-10-25 14:18:43 +05:30 committed by GitHub
parent 307176e5c6
commit 361011c75e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -372,7 +372,7 @@ struct CPUStreamsExecutor::Impl {
public:
CustomThreadLocal(std::function<std::shared_ptr<Stream>()> callback_construct, Impl* impl)
: ThreadLocal<std::shared_ptr<Stream>>(callback_construct),
: ThreadLocal<std::shared_ptr<Stream>>(std::move(callback_construct)),
_impl(impl) {}
std::shared_ptr<Stream> local() {
// maybe there are two CPUStreamsExecutors in the same thread.