add move
This commit is contained in:
@@ -263,7 +263,7 @@ bool PITimer::start(PISystemTime interval) {
|
||||
bool PITimer::start(PISystemTime interval, std::function<void()> func) {
|
||||
if (isRunning()) stopAndWait();
|
||||
setInterval(interval);
|
||||
setSlot(func);
|
||||
setSlot(std::move(func));
|
||||
return start();
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ void PITimer::stopAndWait(PISystemTime timeout) {
|
||||
|
||||
|
||||
void PITimer::addDelimiter(int delim, std::function<void(int)> func) {
|
||||
delims << Delimiter(func, delim);
|
||||
delims << Delimiter(std::move(func), delim);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user