diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2013-04-02 14:03:22 +0200 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2013-04-02 14:03:22 +0200 |
| commit | 7bf73b589683f195e119eddb6adb56fc607cef4e (patch) | |
| tree | 5bf004059569b9a1cd82c5cab86320c7ff9d78f9 /src/utils.hh | |
| parent | e2d64b01d51eedff9173f2cce6f1a7f050918d42 (diff) | |
OnScopeEnd: move parameter instead of copying it
Diffstat (limited to 'src/utils.hh')
| -rw-r--r-- | src/utils.hh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils.hh b/src/utils.hh index 0e155a37..bd52bf0c 100644 --- a/src/utils.hh +++ b/src/utils.hh @@ -196,7 +196,7 @@ template<typename T> class OnScopeEnd { public: - OnScopeEnd(T func) : m_func(func) {} + OnScopeEnd(T func) : m_func(std::move(func)) {} ~OnScopeEnd() { m_func(); } private: T m_func; |
