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>
* Call it from Map::AddObjectToRemoveList and remove now not needed explcit calls
* Create Gameobject version to make GO with owner more safe for remove
this is done by this script:
ack -c "World.h" | ack :1 | sed 's/:1//' | xargs grep -c sWorld | grep :0 | sed 's/:0//' | xargs sed -i '/#include "World.h"/d'
i didn't checked every change but gcc haven't complained
Signed-off-by: miranda.conrado <miranda.conrado@getmangos.com>
Possible fix, not checked (not have access currently to Unix host), but expected as working.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
As a result, the last relation that makes the loop is automatically removed.
An error message is displayed and core go on loading remaining records.
Signed-off-by: Neo2003 <neo.2003@hotmail.fr>
Pools inside another pool cannot have a number of spawned objects <> 1 (maxlimit value)
Note: pools in a pool in a pool in a pool... is possible and working,
but circulare inclusion is not detected and will cause a core infinit loop
Signed-off-by: Neo2003 <neo.2003@hotmail.fr>