diff options
author | ariel- <ariel-@users.noreply.github.com> | 2017-01-23 17:00:35 -0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2018-12-09 14:18:42 +0100 |
commit | 34ad81b176ffe3a183e35118e257c1e6a433f824 (patch) | |
tree | fe32e330071d7ce6a4d9b4e06770ff95e0e1e8a4 /src | |
parent | 217a9bb34ddfde128df1567877cbef7df8729c28 (diff) |
Core/Util: avoid one useless copy when adding stuff into a HookList
(cherry-picked from 077b5aec9ede78034ba2ec4838b72e8121dab7ce)
Diffstat (limited to 'src')
-rw-r--r-- | src/common/Utilities/Util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 2ce427ef991..ceba32fbf9f 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -333,9 +333,9 @@ class HookList final typedef typename ContainerType::const_iterator const_iterator; 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; } |