Core/Util: avoid one useless copy when adding stuff into a HookList

(cherry picked from commit 077b5aec9ede78034ba2ec4838b72e8121dab7ce)
This commit is contained in:
ariel- authored and funjoker committed 2022-01-22 20:27:51 +01:00
1 parent 3681f356d6
commit 29166a1d0a
1 file changed
+3 -3
+3 -3
View File
@@ -334,9 +334,9 @@ class HookList
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;
}
@@ -346,7 +346,7 @@ class HookList
_container.emplace_back(std::forward<Args&&>(args)...);
}
size_t size()
size_t size() const
{
return _container.size();
}