mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[8475] fixed some gcc-warnings
all warnings from Wunused
and some from Wall
cause unused may be most interesting for some:
they were in following files:
src/game/Level2.cpp
src/game/Map.cpp
src/game/SpellAuras.cpp
src/game/Unit.cpp
src/mangosd/Master.cpp
but i guess mostly someone just fogot to remove this code
for some unsigned vs signed warnings i used:
ack "for.*int .*size\(\)" | ack -v uint
also note for coding:
if you do something like
if( a && b || c)
just place parentheses around (a && b) && always will have
precedence over || but without parentheses this could be overseen
quite fast (at least that's my guess why gcc will warn for this)
Signed-off-by: balrok <der-coole-carl@gmx.net>
This commit is contained in:
parent
56ddf40d62
commit
bd30769dec
36 changed files with 96 additions and 101 deletions
|
|
@ -3180,7 +3180,7 @@ bool ChatHandler::HandleWpShowCommand(const char* args)
|
|||
}
|
||||
|
||||
wpCreature->SetVisibility(VISIBILITY_OFF);
|
||||
sLog.outDebug("DEBUG: UPDATE creature_movement SET wpguid = '%u");
|
||||
sLog.outDebug("DEBUG: UPDATE creature_movement SET wpguid = '%u", wpCreature->GetGUIDLow());
|
||||
// set "wpguid" column to the visual waypoint
|
||||
WorldDatabase.PExecuteLog("UPDATE creature_movement SET wpguid = '%u' WHERE id = '%u' and point = '%u'", wpCreature->GetGUIDLow(), lowguid, point);
|
||||
|
||||
|
|
@ -3928,8 +3928,6 @@ void ChatHandler::HandleLearnSkillRecipesHelper(Player* player,uint32 skill_id)
|
|||
|
||||
bool ChatHandler::HandleLearnAllCraftsCommand(const char* /*args*/)
|
||||
{
|
||||
uint32 classmask = m_session->GetPlayer()->getClassMask();
|
||||
|
||||
for (uint32 i = 0; i < sSkillLineStore.GetNumRows(); ++i)
|
||||
{
|
||||
SkillLineEntry const *skillInfo = sSkillLineStore.LookupEntry(i);
|
||||
|
|
@ -3970,8 +3968,6 @@ bool ChatHandler::HandleLearnAllRecipesCommand(const char* args)
|
|||
// converting string that we try to find to lower case
|
||||
wstrToLower( wnamepart );
|
||||
|
||||
uint32 classmask = m_session->GetPlayer()->getClassMask();
|
||||
|
||||
std::string name;
|
||||
|
||||
SkillLineEntry const *targetSkillInfo = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue