Core/Misc: fixed several warnings that have been exposed by the new warnings
This commit is contained in:
1 parent
29fc3d55b4
commit
67b19e741d
6 files changed
+12
-13
No files matched your search
@@ -432,7 +432,7 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* source, GameObject* /*targ
|
||||
TeamId teamIndex = GetTeamIndexByTeamId(source->GetTeam());
|
||||
|
||||
// Check if player really could use this banner, not cheated
|
||||
if (!(m_Nodes[node] == 0 || teamIndex == m_Nodes[node]%2))
|
||||
if (!(m_Nodes[node] == 0 || teamIndex == uint8(m_Nodes[node] % 2)))
|
||||
return;
|
||||
|
||||
source->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::PvPActive);
|
||||
|
||||
@@ -410,7 +410,7 @@ void BattlegroundBFG::EventPlayerClickedOnFlag(Player* source, GameObject* /*tar
|
||||
TeamId teamIndex = GetTeamIndexByTeamId(source->GetTeam());
|
||||
|
||||
// Check if player really could use this banner, not cheated
|
||||
if (!(m_Nodes[node] == 0 || teamIndex == m_Nodes[node] % 2))
|
||||
if (!(m_Nodes[node] == 0 || teamIndex == uint8(m_Nodes[node] % 2)))
|
||||
return;
|
||||
|
||||
source->RemoveAurasWithInterruptFlags(SpellAuraInterruptFlags::PvPActive);
|
||||
|
||||
@@ -261,7 +261,7 @@ void WorldSession::HandleWhoOpcode(WorldPackets::Who::WhoRequestPkt& whoRequest)
|
||||
|
||||
if (!whoRequest.Request.Areas.empty())
|
||||
{
|
||||
if (std::find(whoRequest.Request.Areas.begin(), whoRequest.Request.Areas.end(), target.GetZoneId()) == whoRequest.Request.Areas.end())
|
||||
if (std::find(whoRequest.Request.Areas.begin(), whoRequest.Request.Areas.end(), int32(target.GetZoneId())) == whoRequest.Request.Areas.end())
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -263,7 +263,7 @@ enum SpellSchools
|
||||
MAX_SPELL_SCHOOL = 7
|
||||
};
|
||||
|
||||
enum SpellSchoolMask
|
||||
enum SpellSchoolMask : uint32
|
||||
{
|
||||
SPELL_SCHOOL_MASK_NONE = 0x00, // not exist
|
||||
SPELL_SCHOOL_MASK_NORMAL = (1 << SPELL_SCHOOL_NORMAL), // PHYSICAL (Armor)
|
||||
@@ -881,7 +881,7 @@ enum Language
|
||||
|
||||
#define LANGUAGES_COUNT 21
|
||||
|
||||
enum TeamId
|
||||
enum TeamId : uint32
|
||||
{
|
||||
TEAM_ALLIANCE = 0,
|
||||
TEAM_HORDE,
|
||||
@@ -1543,7 +1543,7 @@ enum AuraStateType
|
||||
(1<<(AURA_STATE_CONFLAGRATE-1))|(1<<(AURA_STATE_DEADLY_POISON-1)))
|
||||
|
||||
// Spell mechanics
|
||||
enum Mechanics
|
||||
enum Mechanics : uint32
|
||||
{
|
||||
MECHANIC_NONE = 0,
|
||||
MECHANIC_CHARM = 1,
|
||||
@@ -3179,7 +3179,7 @@ enum CreatureEliteType
|
||||
};
|
||||
|
||||
// values based at Holidays.dbc
|
||||
enum HolidayIds
|
||||
enum HolidayIds : uint32
|
||||
{
|
||||
HOLIDAY_NONE = 0,
|
||||
|
||||
|
||||
@@ -1500,7 +1500,7 @@ void SpellMgr::LoadSpellGroupStackRules()
|
||||
if (!spellInfo->Effects[i].IsAura())
|
||||
continue;
|
||||
|
||||
int32 auraName = static_cast<int32>(spellInfo->Effects[i].ApplyAuraName);
|
||||
uint32 auraName = spellInfo->Effects[i].ApplyAuraName;
|
||||
for (std::vector<uint32> const& subGroup : SubGroups)
|
||||
{
|
||||
if (std::find(subGroup.begin(), subGroup.end(), auraName) != subGroup.end())
|
||||
|
||||
@@ -74,7 +74,7 @@ class TC_SHARED_API ByteBuffer
|
||||
_storage.reserve(reserve);
|
||||
}
|
||||
|
||||
ByteBuffer(ByteBuffer&& buf) : _rpos(buf._rpos), _wpos(buf._wpos),
|
||||
ByteBuffer(ByteBuffer&& buf) noexcept : _rpos(buf._rpos), _wpos(buf._wpos),
|
||||
_bitpos(buf._bitpos), _curbitval(buf._curbitval), _storage(std::move(buf._storage))
|
||||
{
|
||||
buf._rpos = 0;
|
||||
@@ -100,7 +100,7 @@ class TC_SHARED_API ByteBuffer
|
||||
return *this;
|
||||
}
|
||||
|
||||
ByteBuffer& operator=(ByteBuffer&& right)
|
||||
ByteBuffer& operator=(ByteBuffer&& right) noexcept
|
||||
{
|
||||
if (this != &right)
|
||||
{
|
||||
@@ -586,10 +586,9 @@ class TC_SHARED_API ByteBuffer
|
||||
|
||||
void appendPackGUID(uint64 guid)
|
||||
{
|
||||
uint8 packGUID[8+1];
|
||||
packGUID[0] = 0;
|
||||
uint8 packGUID[8 + 1] = { };
|
||||
size_t size = 1;
|
||||
for (uint8 i = 0;guid != 0;++i)
|
||||
for (uint8 i = 0; guid != 0; ++i)
|
||||
{
|
||||
if (guid & 0xFF)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user