Skip to content

Commit

Permalink
Fix compile error.
Browse files Browse the repository at this point in the history
redundant move in return statement [-Werror=redundant-move]
  • Loading branch information
bdice committed Jan 13, 2025
1 parent f3709cf commit 170030a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cpp/src/concurrent/threadpool.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, NVIDIA CORPORATION.
* Copyright (c) 2021-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -55,8 +55,7 @@ ThreadPool::operator bool() const

std::future<void> ThreadPool::enqueue(std::function<void()> task)
{
auto future = executor_->async([task]() { task(); });
return std::move(future);
return executor_->async([task]() { task(); });
}

void ThreadPool::wait()
Expand Down

0 comments on commit 170030a

Please sign in to comment.