diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-01-23 17:00:35 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2017-01-23 17:00:35 -0300 |
commit | 077b5aec9ede78034ba2ec4838b72e8121dab7ce (patch) | |
tree | c803d1254143552d16e3fc431c8cc19642d0738d /src/common/Utilities/Util.h | |
parent | ad6912f0d578cd94beb2ea6f94b63ec83b605e82 (diff) |
Core/Util: avoid one useless copy when adding stuff into a HookList
Diffstat (limited to 'src/common/Utilities/Util.h')
-rw-r--r-- | src/common/Utilities/Util.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 37ebdeb6f2b..7b9db849b50 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -337,13 +337,13 @@ class HookList final public: typedef typename ContainerType::iterator iterator; - HookList<T>& operator+=(T t) + HookList<T>& operator+=(T&& t) { - _container.push_back(t); + _container.push_back(std::move(t)); return *this; } - size_t size() + size_t size() const { return _container.size(); } |