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

This commit is contained in:
ariel-
2017-01-23 17:00:35 -03:00
parent ad6912f0d5
commit 077b5aec9e

View File

@@ -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();
}