From bd2714535a9be7d030c85198888d989ccce3bf43 Mon Sep 17 00:00:00 2001 From: whipowill Date: Wed, 18 May 2022 15:18:48 -0500 Subject: [PATCH] Compile bug fixes. --- src/PlayerbotMgr.h | 2 +- src/TravelMgr.h | 8 ++++---- src/strategy/Action.h | 2 +- src/strategy/Strategy.h | 4 ++-- src/strategy/Trigger.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/PlayerbotMgr.h b/src/PlayerbotMgr.h index 54a42f5a..cace0fbf 100644 --- a/src/PlayerbotMgr.h +++ b/src/PlayerbotMgr.h @@ -35,7 +35,7 @@ class PlayerbotHolder : public PlayerbotAIBase PlayerBotMap::const_iterator GetPlayerBotsBegin() const { return playerBots.begin(); } PlayerBotMap::const_iterator GetPlayerBotsEnd() const { return playerBots.end(); } - void UpdateAIInternal() override { }; // unused params "uint32 elapsed, bool minimal = false" - whipowill + void UpdateAIInternal([[maybe_unused]] uint32 elapsed, [[maybe_unused]] bool minimal = false) override { }; // unused params - whipowill void UpdateSessions(); void HandleBotPackets(WorldSession* session); diff --git a/src/TravelMgr.h b/src/TravelMgr.h index 1aa178ac..316d4a53 100644 --- a/src/TravelMgr.h +++ b/src/TravelMgr.h @@ -557,7 +557,7 @@ class TravelDestination } virtual Quest const* GetQuestTemplate() { return nullptr; } - virtual bool isActive() { return false; } // unused param "Player* bot" - whipowill + virtual bool isActive([[maybe_unused]] Player* bot) { return false; } // unused param - whipowill bool isFull(bool ignoreFull = false); @@ -600,13 +600,13 @@ class NullTravelDestination : public TravelDestination Quest const* GetQuestTemplate() override { return nullptr; } - bool isActive() override { return false; } // unused param "Player* bot" - whipowill + bool isActive([[maybe_unused]] Player* bot) override { return false; } // unused param - whipowill std::string const getName() override { return "NullTravelDestination"; } std::string const getTitle() override { return "no destination"; } - bool isIn() override { return true; } // unused params "WorldPosition* pos, float radius = 0.f" - whipowill - bool isOut() override { return false; } // unused params "WorldPosition* pos, float radius = 0.f" - whipowill + bool isIn([[maybe_unused]] WorldPosition* pos, [[maybe_unused]] float radius = 0.f) override { return true; } // unused params - whipowill + bool isOut([[maybe_unused]] WorldPosition* pos, [[maybe_unused]] float radius = 0.f) override { return false; } // unused params - whipowill }; //A travel target specifically related to a quest. diff --git a/src/strategy/Action.h b/src/strategy/Action.h index 6076fd7c..ffaa839c 100644 --- a/src/strategy/Action.h +++ b/src/strategy/Action.h @@ -46,7 +46,7 @@ class Action : public AiNamedObject Action(PlayerbotAI* botAI, std::string const name = "action") : AiNamedObject(botAI, name), verbose(false) { } // verbose after ainamedobject - whipowill virtual ~Action(void) { } - virtual bool Execute() { return true; } // unused param "Event event" - whipowill + virtual bool Execute([[maybe_unused]] Event event) { return true; } // unused param - whipowill virtual bool isPossible() { return true; } virtual bool isUseful() { return true; } virtual NextAction** getPrerequisites() { return nullptr; } diff --git a/src/strategy/Strategy.h b/src/strategy/Strategy.h index 95260af4..278dda2d 100644 --- a/src/strategy/Strategy.h +++ b/src/strategy/Strategy.h @@ -44,8 +44,8 @@ class Strategy : public PlayerbotAIAware virtual ~Strategy() { } virtual NextAction** getDefaultActions() { return nullptr; } - virtual void InitTriggers() { } // unused params "std::vector &triggers" - whipowill - virtual void InitMultipliers() { } // unused params "std::vector &multipliers" - whipowill + virtual void InitTriggers([[maybe_unused]] std::vector &triggers) { } // unused params - whipowill + virtual void InitMultipliers([[maybe_unused]] std::vector &multipliers) { } // unused params - whipowill virtual std::string const getName() = 0; virtual uint32 GetType() const { return STRATEGY_TYPE_GENERIC; } virtual ActionNode* GetAction(std::string const name); diff --git a/src/strategy/Trigger.h b/src/strategy/Trigger.h index f21df457..10865a42 100644 --- a/src/strategy/Trigger.h +++ b/src/strategy/Trigger.h @@ -19,8 +19,8 @@ class Trigger : public AiNamedObject virtual ~Trigger() { } virtual Event Check(); - virtual void ExternalEvent() { } // unused params "std::string const param, Player* owner = nullptr" - whipowill - virtual void ExternalEvent() { } // unused params "WorldPacket& packet, Player* owner = nullptr" - whipowill + virtual void ExternalEvent([[maybe_unused]] std::string const param, [[maybe_unused]] Player* owner = nullptr) { } // unused params - whipowill + virtual void ExternalEvent([[maybe_unused]] WorldPacket& packet, [[maybe_unused]] Player* owner = nullptr) { } // unused params - whipowill virtual bool IsActive() { return false; } virtual NextAction** getHandlers() { return nullptr; } void Update() { }