removed duplicated includes

i used the following script
(i have no awk-skills :-/ i guess with awk it will look much better)
for i in `ls *.h`
do
    HEADER="#include \\\""`echo $i | sed 's/\./\\\\./'`"\\\"" #a grep-readable #include "file.h"
    # following should deletes the first occurence of a duplicated
    # (#include) line
    # if an include is more then once in this file this script
    # has to be run more often - i don't know a better solution
    grep -cH "$HEADER" *.[hcpp]* | grep -v :1$ | grep -v :0 | sed -r 's/:[0-9]*$//' | xargs sed -i '0,/#include "'$i'"/{//d;}'
done

Signed-off-by: VladimirMangos <vladimir@getmangos.com>

Restored build for x64: WorldSession expected to be fist include in WorldSession.cpp
This commit is contained in:
balrok 2009-03-06 17:43:54 +01:00 committed by VladimirMangos
parent 6c39db38f4
commit f3ea479f6e
7 changed files with 1 additions and 9 deletions

View file

@ -20,7 +20,6 @@
#include "Database/DatabaseEnv.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "World.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "Item.h"