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

@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "InstanceSaveMgr.h"
#include "Common.h"
#include "Database/SQLStorage.h"