From 4557aa8a1b955978c22f95d4b3f78180c32aa099 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 21 Mar 2017 21:48:56 +0100 Subject: Build fix --- src/server/game/AI/ScriptedAI/ScriptedCreature.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/server/game/AI/ScriptedAI') 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 - 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(listCopy, predicate, max); + Trinity::Containers::RandomResizeList(listCopy, std::forward(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 -- cgit v1.2.3