diff options
author | Shauren <shauren.trinity@gmail.com> | 2017-03-21 21:48:56 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2017-03-21 21:48:56 +0100 |
commit | 4557aa8a1b955978c22f95d4b3f78180c32aa099 (patch) | |
tree | f5a6dfc28602adab3c7895f200316d857725735d /src | |
parent | a1e3b54e076bf0361d23ace53703a4e501354d7c (diff) |
Build fix
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AI/ScriptedAI/ScriptedCreature.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/AI/ScriptedAI/ScriptedCreature.h b/src/server/game/AI/ScriptedAI/ScriptedCreature.h index a0cd1e7daab..6d377e5f874 100644 --- a/src/server/game/AI/ScriptedAI/ScriptedCreature.h +++ b/src/server/game/AI/ScriptedAI/ScriptedCreature.h @@ -107,11 +107,11 @@ public: } template <class Predicate> - void DoAction(int32 info, Predicate& predicate, uint16 max = 0) + void DoAction(int32 info, Predicate&& predicate, uint16 max = 0) { // We need to use a copy of SummonList here, otherwise original SummonList would be modified StorageType listCopy = storage_; - Trinity::Containers::RandomResizeList<ObjectGuid, Predicate>(listCopy, predicate, max); + Trinity::Containers::RandomResizeList<StorageType, Predicate>(listCopy, std::forward<Predicate>(predicate), max); for (StorageType::iterator i = listCopy.begin(); i != listCopy.end(); ) { Creature* summon = ObjectAccessor::GetCreature(*me, *i++); @@ -133,7 +133,7 @@ class TC_GAME_API EntryCheckPredicate { public: EntryCheckPredicate(uint32 entry) : _entry(entry) { } - bool operator()(ObjectGuid guid) { return guid.GetEntry() == _entry; } + bool operator()(ObjectGuid const& guid) const { return guid.GetEntry() == _entry; } private: uint32 _entry; @@ -142,7 +142,7 @@ class TC_GAME_API EntryCheckPredicate class TC_GAME_API DummyEntryCheckPredicate { public: - bool operator()(ObjectGuid) { return true; } + bool operator()(ObjectGuid const&) const { return true; } }; struct TC_GAME_API ScriptedAI : public CreatureAI |