cleanup inspired by GCC build

This commit is contained in:
Olion17 2016-03-02 23:34:54 +00:00 committed by Antz
parent c7ebd0cb92
commit ceaf2aa1e9
20 changed files with 59 additions and 51 deletions

View File

@ -715,7 +715,7 @@ void BattleGround::EndBattleGround(Team winner)
#endif /* ENABLE_ELUNA */
this->RemoveFromBGFreeSlotQueue();
uint32 loser_rating = 0;
//uint32 loser_rating = 0;
uint32 winner_rating = 0;
WorldPacket data;
int32 winmsg_id = 0;

View File

@ -846,7 +846,7 @@ void BattleGroundMgr::DeleteAllBattleGrounds()
}
// used to update running battlegrounds, and delete finished ones
void BattleGroundMgr::Update(uint32 diff)
void BattleGroundMgr::Update(uint32 /*diff*/)
{
// update scheduled queues
if (!m_QueueUpdateScheduler.empty())
@ -1258,7 +1258,7 @@ void BattleGroundMgr::BuildBattleGroundListPacket(WorldPacket* data, ObjectGuid
*data << uint8(0x00); // unk
size_t count_pos = data->wpos();
uint32 count = 0;
//uint32 count = 0;
*data << uint32(0); // number of bg instances
// battleground

View File

@ -59,7 +59,7 @@ class MovementGenerator
virtual void unitSpeedChanged() { }
// used by Evade code for select point to evade with expected restart default movement
virtual bool GetResetPosition(Unit&, float& /*x*/, float& /*y*/, float& /*z*/, float& o) const { return false; }
virtual bool GetResetPosition(Unit&, float& /*x*/, float& /*y*/, float& /*z*/, float& /*o*/) const { return false; }
// given destination unreachable? due to pathfinsing or other
virtual bool IsReachable() const { return true; }

View File

@ -1260,7 +1260,7 @@ void Creature::SelectLevel(const CreatureInfo* cinfo, float percentHealth /*= 10
SetModifierValue(UNIT_MOD_HEALTH, BASE_VALUE, float(health));
// all power types
for (int i = POWER_MANA; i <= POWER_HAPPINESS; ++i)
for (uint8 i = POWER_MANA; i <= POWER_HAPPINESS; ++i)
{
uint32 maxValue;
@ -2693,7 +2693,7 @@ void Creature::SetSwim(bool enable)
SendMessageToSet(&data, true);
}
void Creature::SetCanFly(bool enable)
void Creature::SetCanFly(bool /*enable*/)
{
// TODO: check if there is something similar for 1.12.x (dragons and other flying NPCs)
// if (enable)

View File

@ -8107,7 +8107,7 @@ void ObjectMgr::LoadActiveEntities(Map* _map)
if (!_map)
{
uint32 continents[] = {0, 1};
for (int i = 0; i < countof(continents); ++i)
for (uint8 i = 0; i < countof(continents); ++i)
{
_map = sMapMgr.FindMap(continents[i]);
if (!_map)

View File

@ -402,9 +402,9 @@ void Pet::SavePetToDB(PetSaveMode mode)
_SaveSpellCooldowns();
_SaveAuras();
uint32 loyalty = 1;
if (getPetType() != HUNTER_PET)
{ loyalty = GetLoyaltyLevel(); }
//uint32 loyalty = 1;
//if (getPetType() != HUNTER_PET)
// { loyalty = GetLoyaltyLevel(); }
uint32 ownerLow = GetOwnerGuid().GetCounter();
// remove current data
@ -1998,7 +1998,7 @@ void Pet::CastOwnerTalentAuras()
if (!GetOwner() || GetOwner()->GetTypeId() != TYPEID_PLAYER)
{ return; }
Player* pOwner = static_cast<Player*>(GetOwner());
//Player* pOwner = static_cast<Player*>(GetOwner());
// Add below code handling spells cast by pet when owner/player has aura from talent
}

View File

@ -142,7 +142,7 @@ PlayerTaxi::PlayerTaxi()
memset(m_taximask, 0, sizeof(m_taximask));
}
void PlayerTaxi::InitTaxiNodes(uint32 race, uint32 level)
void PlayerTaxi::InitTaxiNodes(uint32 race, uint32 /*level*/)
{
memset(m_taximask, 0, sizeof(m_taximask));
// capital and taxi hub masks
@ -1098,7 +1098,7 @@ DrunkenState Player::GetDrunkenstateByValue(uint16 value)
return DRUNKEN_SOBER;
}
void Player::SetDrunkValue(uint16 newDrunkenValue, uint32 itemId)
void Player::SetDrunkValue(uint16 newDrunkenValue, uint32 /*itemId*/)
{
uint32 oldDrunkenState = Player::GetDrunkenstateByValue(m_drunk);
@ -4065,7 +4065,7 @@ void Player::SetWaterWalk(bool enable)
GetSession()->SendPacket(&data);
}
void Player::SetLevitate(bool enable)
void Player::SetLevitate(bool /*enable*/)
{
// TODO: check if there is something similar for 2.4.3.
// WorldPacket data;
@ -4084,7 +4084,7 @@ void Player::SetLevitate(bool enable)
// SendMessageToSet(&data, false);
}
void Player::SetCanFly(bool enable)
void Player::SetCanFly(bool /*enable*/)
{
// TODO: check if there is something similar for 1.12.x (99% chance there is not)
// WorldPacket data;
@ -4535,7 +4535,7 @@ void Player::RepopAtGraveyard()
// note: this can be called also when the player is alive
// for example from WorldSession::HandleMovementOpcodes
AreaTableEntry const* zone = GetAreaEntryByAreaID(GetAreaId());
//AreaTableEntry const* zone = GetAreaEntryByAreaID(GetAreaId());
WorldSafeLocsEntry const* ClosestGrave = NULL;
@ -4792,7 +4792,7 @@ float Player::GetSpellCritFromIntellect()
// increases his intelligence by other means (enchants, buffs, talents, ...)
//[TZERO] from mangos 3462 for 1.12 MUST BE CHECKED
float val = 0.0f;
//float val = 0.0f;
static const struct
{
@ -5952,7 +5952,7 @@ void Player::RewardReputation(Quest const* pQuest)
// Update honor fields , cleanKills is only used during char saving
void Player::UpdateHonor()
{
uint32 lastweek_honorableKills = 0;
//uint32 lastweek_honorableKills = 0;
uint32 today_honorableKills = 0;
uint32 today_dishonorableKills = 0;
uint32 yesterdayKills = 0;
@ -5962,7 +5962,7 @@ void Player::UpdateHonor()
float yesterdayHonor = 0.0f;
float thisWeekHonor = 0.0f;
float lastWeekHonor = 0.0f;
float todayLostHonor = 0.0f;
//float todayLostHonor = 0.0f;
uint32 today = sWorld.GetDateToday();
@ -6127,7 +6127,7 @@ uint32 Player::CalculateTotalKills(Unit* Victim, uint32 fromDate, uint32 toDate)
bool Player::RewardHonor(Unit* uVictim, uint32 groupsize)
{
float honor_points = 0;
int kill_type = 0;
//int kill_type = 0;
DETAIL_LOG("PLAYER: RewardHonor");
@ -8354,7 +8354,7 @@ InventoryResult Player::_CanTakeMoreSimilarItems(uint32 entry, uint32 count, Ite
return EQUIP_ERR_OK;
}
bool Player::HasItemTotemCategory(uint32 TotemCategory) const
bool Player::HasItemTotemCategory(uint32 /*TotemCategory*/) const
{
/*[-ZERO] Item *pItem;
for(uint8 i = EQUIPMENT_SLOT_START; i < INVENTORY_SLOT_ITEM_END; ++i)
@ -11048,7 +11048,7 @@ void Player::ApplyEnchantment(Item* item, bool apply)
{ ApplyEnchantment(item, EnchantmentSlot(slot), apply); }
}
void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool apply_dur, bool ignore_condition)
void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool apply_dur, bool /*ignore_condition*/)
{
if (!item)
{ return; }
@ -14835,7 +14835,7 @@ void Player::_LoadBoundInstances(QueryResult* result)
InstancePlayerBind* Player::GetBoundInstance(uint32 mapid)
{
const MapEntry* entry = sMapStore.LookupEntry(mapid);
//const MapEntry* entry = sMapStore.LookupEntry(mapid);
BoundInstancesMap::iterator itr = m_boundInstances.find(mapid);
if (itr != m_boundInstances.end())
@ -14938,7 +14938,7 @@ void Player::SendRaidInfo()
size_t p_counter = data.wpos();
data << uint32(counter); // placeholder
time_t now = time(NULL);
//time_t now = time(NULL);
for (BoundInstancesMap::const_iterator itr = m_boundInstances.begin(); itr != m_boundInstances.end(); ++itr)
{
@ -18260,7 +18260,7 @@ bool Player::HasItemFitToSpellReqirements(SpellEntry const* spellInfo, Item cons
return false;
}
bool Player::CanNoReagentCast(SpellEntry const* spellInfo) const
bool Player::CanNoReagentCast(SpellEntry const* /*spellInfo*/) const
{
// don't take reagents for spells with SPELL_ATTR_EX5_NO_REAGENT_WHILE_PREP
//[-ZERO] if (spellInfo->AttributesEx5 & SPELL_ATTR_EX5_NO_REAGENT_WHILE_PREP &&

View File

@ -317,22 +317,22 @@ void Player::UpdateAttackPowerAndDamage(bool ranged)
void Player::CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, float& min_damage, float& max_damage)
{
UnitMods unitMod;
UnitMods attPower;
//UnitMods attPower;
switch (attType)
{
case BASE_ATTACK:
default:
unitMod = UNIT_MOD_DAMAGE_MAINHAND;
attPower = UNIT_MOD_ATTACK_POWER;
//attPower = UNIT_MOD_ATTACK_POWER;
break;
case OFF_ATTACK:
unitMod = UNIT_MOD_DAMAGE_OFFHAND;
attPower = UNIT_MOD_ATTACK_POWER;
//attPower = UNIT_MOD_ATTACK_POWER;
break;
case RANGED_ATTACK:
unitMod = UNIT_MOD_DAMAGE_RANGED;
attPower = UNIT_MOD_ATTACK_POWER_RANGED;
//attPower = UNIT_MOD_ATTACK_POWER_RANGED;
break;
}

View File

@ -1914,7 +1914,7 @@ void Unit::CalculateDamageAbsorbAndResist(Unit* pCaster, SpellSchoolMask schoolM
if (!(mod->m_miscvalue & schoolMask))
{ continue; }
SpellEntry const* spellProto = (*i)->GetSpellProto();
//SpellEntry const* spellProto = (*i)->GetSpellProto();
// Max Amount can be absorbed by this aura
int32 currentAbsorb = mod->m_amount;
@ -3541,6 +3541,8 @@ bool Unit::AddSpellAuraHolder(SpellAuraHolder* holder)
case TRACK_AURA_TYPE_SINGLE_TARGET: // Register spell holder single target
scTargets[aurSpellInfo] = GetObjectGuid();
break;
default:
break;
}
}
}
@ -3835,7 +3837,7 @@ void Unit::RemoveSingleAuraFromSpellAuraHolder(uint32 spellId, SpellEffectIndex
}
}
void Unit::RemoveAuraHolderDueToSpellByDispel(uint32 spellId, uint32 stackAmount, ObjectGuid casterGuid, Unit* dispeller)
void Unit::RemoveAuraHolderDueToSpellByDispel(uint32 spellId, uint32 stackAmount, ObjectGuid casterGuid, Unit* /*dispeller*/)
{
RemoveAuraHolderFromStack(spellId, stackAmount, casterGuid, AURA_REMOVE_BY_DISPEL);
}
@ -5476,6 +5478,8 @@ int32 Unit::SpellBonusWithCoeffs(Unit* pCaster, SpellEntry const* spellProto, in
}
break;
}
default:
break;
}
// apply ap bonus at done part calculation only (it flat total mod so common with taken)
@ -6087,7 +6091,7 @@ uint32 Unit::MeleeDamageBonusDone(Unit* pVictim, uint32 pdamage, WeaponAttackTyp
bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || spellProto->HasSpellEffect(SPELL_EFFECT_SCHOOL_DAMAGE)));
Item* pWeapon = GetTypeId() == TYPEID_PLAYER ? ((Player*)this)->GetWeaponForAttack(attType, true, false) : NULL;
uint32 creatureTypeMask = pVictim->GetCreatureTypeMask();
uint32 schoolMask = spellProto ? GetSpellSchoolMask(spellProto) : uint32(GetMeleeDamageSchoolMask());
uint32 schoolMask = uint32(spellProto ? GetSpellSchoolMask(spellProto) : GetMeleeDamageSchoolMask());
// FLAT damage bonus auras
// =======================
@ -6225,7 +6229,7 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* pCaster, uint32 pdamage, WeaponAttackTy
// differentiate for weapon damage based spells
bool isWeaponDamageBasedSpell = !(spellProto && (damagetype == DOT || spellProto->HasSpellEffect(SPELL_EFFECT_SCHOOL_DAMAGE)));
uint32 schoolMask = spellProto ? GetSpellSchoolMask(spellProto) : uint32(GetMeleeDamageSchoolMask());
uint32 schoolMask = uint32(spellProto ? GetSpellSchoolMask(spellProto) :GetMeleeDamageSchoolMask());
// FLAT damage bonus auras
// =======================

View File

@ -561,14 +561,14 @@ void Channel::Say(Player* player, const char* text, uint32 lang)
if (!text)
return;
uint32 sec = 0;
//uint32 sec = 0;
ObjectGuid guid = player->GetObjectGuid();
Player* plr = sObjectMgr.GetPlayer(guid);
bool speakInLocalDef = false;
bool speakInWorldDef = false;
if (plr)
{
sec = plr->GetSession()->GetSecurity();
//sec = plr->GetSession()->GetSecurity();
if (plr->isGameMaster())
{
speakInLocalDef = true;
@ -935,12 +935,12 @@ void Channel::MakeThrottled(WorldPacket* data)
MakeNotifyPacket(data, CHAT_THROTTLED_NOTICE);
}
void Channel::JoinNotify(ObjectGuid guid)
void Channel::JoinNotify(ObjectGuid /*guid*/)
{
// [-ZERO] Feature doesn't exist in 1.x.
}
void Channel::LeaveNotify(ObjectGuid guid)
void Channel::LeaveNotify(ObjectGuid /*guid*/)
{
// [-ZERO] Feature doesn't exist in 1.x.
}

View File

@ -3347,7 +3347,7 @@ void ChatHandler::LogCommand(char const* fullcmd)
void ChatHandler::BuildChatPacket(WorldPacket& data, ChatMsg msgtype, char const* message, Language language /*= LANG_UNIVERSAL*/, ChatTagFlags chatTag /*= CHAT_TAG_NONE*/,
ObjectGuid const& senderGuid /*= ObjectGuid()*/, char const* senderName /*= NULL*/,
ObjectGuid const& targetGuid /*= ObjectGuid()*/, char const* targetName /*= NULL*/,
ObjectGuid const& targetGuid /*= ObjectGuid()*/, char const* /*targetName*/ /*= NULL*/,
char const* channelName /*= NULL*/, uint8 playerRank /*= 0*/)
{
data.Initialize(SMSG_MESSAGECHAT);

View File

@ -349,7 +349,7 @@ bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags
break;
}
case DISABLE_TYPE_MAP:
if (Player const* player = unit->ToPlayer())
if (/*Player const* player = */unit->ToPlayer())
{
// [-ZERO]
//MapEntry const* mapEntry = sMapStore.LookupEntry(entry);
@ -391,6 +391,8 @@ bool IsDisabledFor(DisableType type, uint32 entry, Unit const* unit, uint8 flags
case DISABLE_TYPE_CREATURE_SPAWN:
case DISABLE_TYPE_GAMEOBJECT_SPAWN:
return (itr->second.flags & SPAWN_DISABLE_CHECK_GUID) == 0 || itr->second.params[0].count(adData) > 0;
default:
break;
}
return false;

View File

@ -232,7 +232,7 @@ bool GridMap::loadHeightData(FILE* in, uint32 offset, uint32 /*size*/)
return true;
}
bool GridMap::loadHolesData(FILE* in, uint32 offset, uint32 size)
bool GridMap::loadHolesData(FILE* in, uint32 offset, uint32 /*size*/)
{
if (fseek(in, offset, SEEK_SET) != 0)
return false;

View File

@ -73,7 +73,7 @@ void WorldSession::HandleGuildCreateOpcode(WorldPacket& recvPacket)
sGuildMgr.AddGuild(guild);
}
void WorldSession::SendGuildInvite(Player* player, bool alreadyInGuild /*= false*/)
void WorldSession::SendGuildInvite(Player* player, bool /*alreadyInGuild*/ /*= false*/)
{
Guild* guild = sGuildMgr.GetGuildById(GetPlayer()->GetGuildId());
player->SetGuildIdInvited(GetPlayer()->GetGuildId());

View File

@ -90,7 +90,7 @@ void WorldSession::HandleMeetingStoneJoinOpcode(WorldPacket& recv_data)
sLFGMgr.AddToQueue(_player, gInfo->meetingstone.areaID);
}
void WorldSession::HandleMeetingStoneLeaveOpcode(WorldPacket& recv_data)
void WorldSession::HandleMeetingStoneLeaveOpcode(WorldPacket& /*recv_data*/)
{
DEBUG_LOG("WORLD: Recvd CMSG_MEETINGSTONE_LEAVE");
if(Group *grp = _player->GetGroup())

View File

@ -154,6 +154,8 @@ void WorldSession::HandleAutostoreLootItemOpcode(WorldPacket& recv_data)
}
break;
}
default:
break;
}
}

View File

@ -170,9 +170,9 @@ void WorldSession::HandleSendMail(WorldPacket& recv_data)
return;
}
uint32 rc_account = receive
? receive->GetSession()->GetAccountId()
: sObjectMgr.GetPlayerAccountIdByGUID(rc);
//uint32 rc_account = receive
// ? receive->GetSession()->GetAccountId()
// : sObjectMgr.GetPlayerAccountIdByGUID(rc);
Item* item = NULL;
@ -542,7 +542,7 @@ void WorldSession::HandleGetMailList(WorldPacket& recv_data)
{ return; }
// client can't work with packets > max int16 value
const uint32 maxPacketSize = 32767;
//const uint32 maxPacketSize = 32767;
uint32 mailsCount = 0; // send to client mails amount

View File

@ -51,7 +51,7 @@
#include "LuaEngine.h"
#endif /* ENABLE_ELUNA */
void WorldSession::HandleRepopRequestOpcode(WorldPacket& recv_data)
void WorldSession::HandleRepopRequestOpcode(WorldPacket& /*recv_data*/)
{
DEBUG_LOG("WORLD: Received opcode CMSG_REPOP_REQUEST");
@ -454,7 +454,7 @@ void WorldSession::HandleStandStateChangeOpcode(WorldPacket& recv_data)
_player->SetStandState(animstate);
}
void WorldSession::HandleFriendListOpcode(WorldPacket& recv_data)
void WorldSession::HandleFriendListOpcode(WorldPacket& /*recv_data*/)
{
DEBUG_LOG("WORLD: Received opcode CMSG_FRIEND_LIST");
_player->GetSocial()->SendFriendList();
@ -773,7 +773,7 @@ void WorldSession::HandleAreaTriggerOpcode(WorldPacket& recv_data)
// ghost resurrected at enter attempt to dungeon with corpse (including fail enter cases)
if (!_player->IsAlive() && targetMapEntry->IsDungeon())
{
int32 corpseMapId = 0;
uint32 corpseMapId = 0; // was planned to be negative as "incorrect" id? anyway map 0 is not instanceable
if (Corpse* corpse = _player->GetCorpse())
{ corpseMapId = corpse->GetMapId(); }

View File

@ -315,7 +315,7 @@ void WorldSession::HandleTrainerBuySpellOpcode(WorldPacket& recv_data)
{ return; }
SpellEntry const* proto = sSpellStore.LookupEntry(trainer_spell->spell);
SpellEntry const* spellInfo = sSpellStore.LookupEntry(proto->EffectTriggerSpell[0]);
//SpellEntry const* spellInfo = sSpellStore.LookupEntry(proto->EffectTriggerSpell[0]);
// apply reputation discount
uint32 nSpellCost = uint32(floor(trainer_spell->spellCost * _player->GetReputationPriceDiscount(unit)));

View File

@ -1094,7 +1094,7 @@ void PoolManager::LoadFromDB()
pool_id = zone_id + max_pool_id + 3486; //3486 zero value for maxzoneID
}
PoolTemplateData* pPoolTemplate = &mPoolTemplate[pool_id];
//PoolTemplateData* pPoolTemplate = &mPoolTemplate[pool_id];
PoolObject plObject = PoolObject(guid, 0);
PoolGroup<GameObject>& gogroup = mPoolGameobjectGroups[pool_id];