mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Util: avoid one useless copy when adding stuff into a HookList
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user