Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmake/compiler/clang/settings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
9 changes: 0 additions & 9 deletions src/common/Utilities/Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
9 changes: 6 additions & 3 deletions src/server/game/Entities/Object/Position.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Entities/Player/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
12 changes: 0 additions & 12 deletions src/server/game/Guilds/GuildFinderMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -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; }

Expand Down
1 change: 0 additions & 1 deletion src/server/game/Movement/Spline/MoveSplineFlag.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ namespace Movement

MoveSplineFlag() { raw() = 0; }
MoveSplineFlag(uint32 f) { raw() = f; }
MoveSplineFlag(const MoveSplineFlag& f) { raw() = f.raw(); }

// Constant interface

Expand Down
6 changes: 0 additions & 6 deletions src/server/shared/Dynamic/LinkedList.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down