move std function
This commit is contained in:
@@ -136,7 +136,7 @@ PIThreadPoolLoop::~PIThreadPoolLoop() {
|
||||
|
||||
|
||||
void PIThreadPoolLoop::setFunction(std::function<void(int)> f) {
|
||||
func = f;
|
||||
func = std::move(f);
|
||||
}
|
||||
|
||||
|
||||
@@ -163,6 +163,6 @@ void PIThreadPoolLoop::exec(int index_start, int index_count) {
|
||||
|
||||
|
||||
void PIThreadPoolLoop::exec(int index_start, int index_count, std::function<void(int)> f) {
|
||||
setFunction(f);
|
||||
setFunction(std::move(f));
|
||||
exec(index_start, index_count);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user