diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake index 019079e3..626d73cc 100644 --- a/cmake/compiler/clang/settings.cmake +++ b/cmake/compiler/clang/settings.cmake @@ -13,6 +13,12 @@ if(WITH_WARNINGS) -Wfatal-errors -Wno-mismatched-tags -Woverloaded-virtual) + + if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10) + target_compile_options(trinity-warning-interface + INTERFACE + -Wno-deprecated-copy) # warning in g3d + endif() message(STATUS "Clang: All warnings enabled") endif() diff --git a/src/common/Utilities/Util.h b/src/common/Utilities/Util.h index 93d97305..3dfbfb48 100644 --- a/src/common/Utilities/Util.h +++ b/src/common/Utilities/Util.h @@ -443,15 +443,6 @@ class TC_COMMON_API flag128 return !this->operator ==(right); } - inline flag128 & operator =(const flag128 &right) - { - part[0] = right.part[0]; - part[1] = right.part[1]; - part[2] = right.part[2]; - part[3] = right.part[3]; - return *this; - } - inline flag128 operator &(const flag128 &right) const { return flag128(part[0] & right.part[0], part[1] & right.part[1], diff --git a/src/server/game/Entities/Object/Position.h b/src/server/game/Entities/Object/Position.h index 821c6722..ea8ea44d 100644 --- a/src/server/game/Entities/Object/Position.h +++ b/src/server/game/Entities/Object/Position.h @@ -60,6 +60,12 @@ struct TC_GAME_API Position float m_orientation; public: + Position& operator=(Position const& loc) + { + Relocate(loc); + return *this; + } + bool operator==(Position const &a) const; inline bool operator!=(Position const &a) const @@ -267,9 +273,6 @@ class TC_GAME_API WorldLocation : public Position WorldLocation(uint32 mapId, Position const& position) : Position(position), m_mapId(mapId) { } - WorldLocation(WorldLocation const& loc) - : Position(loc), m_mapId(loc.GetMapId()) { } - void WorldRelocate(WorldLocation const& loc) { m_mapId = loc.GetMapId(); diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 5b789c86..177000f4 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -24431,7 +24431,7 @@ bool Player::BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uin uint64 price = 0; if (crItem->IsGoldRequired(pProto) && crItem->GetBuyPrice(pProto) > 0) //Assume price cannot be negative (do not know why it is int32) { - float buyPricePerItem = float(crItem->GetBuyPrice(pProto)) / pProto->GetBuyCount(); + double buyPricePerItem = double(crItem->GetBuyPrice(pProto)) / pProto->GetBuyCount(); uint64 maxCount = MAX_MONEY_AMOUNT / buyPricePerItem; if ((uint64)count > maxCount) { diff --git a/src/server/game/Guilds/GuildFinderMgr.h b/src/server/game/Guilds/GuildFinderMgr.h index ff80a9d6..970503a2 100644 --- a/src/server/game/Guilds/GuildFinderMgr.h +++ b/src/server/game/Guilds/GuildFinderMgr.h @@ -118,15 +118,6 @@ struct LFGuildPlayer _level = level; } - LFGuildPlayer(LFGuildPlayer const& settings) : _comment(settings.GetComment()) - { - _guid = settings.GetGUID(); - _roles = settings.GetClassRoles(); - _availability = settings.GetAvailability(); - _interests = settings.GetInterests(); - _level = settings.GetLevel(); - } - ObjectGuid const& GetGUID() const { return _guid; } uint8 GetClassRoles() const { return _roles; } uint8 GetAvailability() const { return _availability; } @@ -157,9 +148,6 @@ struct LFGuildSettings : public LFGuildPlayer LFGuildSettings(bool listed, TeamId team, ObjectGuid const& guid, uint8 role, uint8 availability, uint8 interests, uint8 level, std::string& comment) : LFGuildPlayer(guid, role, availability, interests, level, comment), _listed(listed), _team(team) {} - LFGuildSettings(LFGuildSettings const& settings) : - LFGuildPlayer(settings), _listed(settings.IsListed()), _team(settings.GetTeam()) {} - bool IsListed() const { return _listed; } void SetListed(bool state) { _listed = state; } diff --git a/src/server/game/Movement/Spline/MoveSplineFlag.h b/src/server/game/Movement/Spline/MoveSplineFlag.h index 46f193b9..161780f5 100644 --- a/src/server/game/Movement/Spline/MoveSplineFlag.h +++ b/src/server/game/Movement/Spline/MoveSplineFlag.h @@ -76,7 +76,6 @@ namespace Movement MoveSplineFlag() { raw() = 0; } MoveSplineFlag(uint32 f) { raw() = f; } - MoveSplineFlag(const MoveSplineFlag& f) { raw() = f.raw(); } // Constant interface diff --git a/src/server/shared/Dynamic/LinkedList.h b/src/server/shared/Dynamic/LinkedList.h index 8683c3a3..122cc65a 100644 --- a/src/server/shared/Dynamic/LinkedList.h +++ b/src/server/shared/Dynamic/LinkedList.h @@ -164,12 +164,6 @@ class LinkedListHead { // construct with node pointer _Pnode } - Iterator& operator=(Iterator const &_Right) - { - _Ptr = _Right._Ptr; - return *this; - } - Iterator& operator=(const_pointer const &_Right) { _Ptr = pointer(_Right);