diff --git a/src/server/game/AI/NpcBots/botcommands.cpp b/src/server/game/AI/NpcBots/botcommands.cpp index babf2ba02..57846e22c 100644 --- a/src/server/game/AI/NpcBots/botcommands.cpp +++ b/src/server/game/AI/NpcBots/botcommands.cpp @@ -451,12 +451,13 @@ private: struct BotInfo { - explicit BotInfo(uint32 Id, std::string&& Name, uint8 Race) : id(Id), name(std::move(Name)), race(Race) {} + BotInfo(uint32 Id, std::string&& Name, uint8 Race) : id(Id), name(std::move(Name)), race(Race) {} uint32 id; std::string name; uint8 race; - inline constexpr std::strong_ordering operator<=>(BotInfo const& other) const noexcept = default; + inline constexpr bool operator==(BotInfo const& other) const noexcept { return id == other.id; } + inline constexpr std::strong_ordering operator<=>(BotInfo const& other) const noexcept { return id <=> other.id; } }; static char const* get_race_name(uint8 race) diff --git a/src/server/game/AI/NpcBots/botwanderful.h b/src/server/game/AI/NpcBots/botwanderful.h index e04b3bafe..99b66332f 100644 --- a/src/server/game/AI/NpcBots/botwanderful.h +++ b/src/server/game/AI/NpcBots/botwanderful.h @@ -76,9 +76,10 @@ public: WanderNode* wp; uint32 weight; - inline uint32 Id() const { return wp ? wp->GetWPId() : 0; } + inline constexpr uint32 Id() const noexcept { return wp ? wp->GetWPId() : 0; } - inline constexpr std::strong_ordering operator<=>(WanderNodeLink const& other) const noexcept = default; + inline constexpr bool operator==(WanderNodeLink const& other) const noexcept { return Id() == other.Id(); } + inline constexpr std::strong_ordering operator<=>(WanderNodeLink const& other) const noexcept { return Id() <=> other.Id(); } struct WeightExtractor { inline constexpr uint32 operator()(WanderNodeLink const& wpl) const noexcept { return wpl.weight; }