summaryrefslogtreecommitdiff
path: root/src/utils.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2013-04-02 14:03:22 +0200
committerMaxime Coste <frrrwww@gmail.com>2013-04-02 14:03:22 +0200
commit7bf73b589683f195e119eddb6adb56fc607cef4e (patch)
tree5bf004059569b9a1cd82c5cab86320c7ff9d78f9 /src/utils.hh
parente2d64b01d51eedff9173f2cce6f1a7f050918d42 (diff)
OnScopeEnd: move parameter instead of copying it
Diffstat (limited to 'src/utils.hh')
-rw-r--r--src/utils.hh2
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;