Skip to content

Commit

Permalink
Button improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudryashov Dmitrii committed Nov 5, 2021
1 parent 9ca1cc4 commit 5bb2887
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Button/button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ class Button {
func_();
}
}
void bind(const function<void()>& func) {
func_ = func;
void bind(function<void()>&& func) {
func_ = move(func);
}

private:
Expand Down Expand Up @@ -41,5 +41,9 @@ int main() {
btn2.click();
btn3.click();

btn1.click();
btn2.click();
btn3.click();

return 0;
}

0 comments on commit 5bb2887

Please sign in to comment.