From 61a3be1d9496c204c81b5871bf9c11c69752e177 Mon Sep 17 00:00:00 2001 From: balrok Date: Fri, 6 Mar 2009 17:43:54 +0100 Subject: [PATCH] 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 Restored build for x64: WorldSession expected to be fist include in WorldSession.cpp --- src/game/CreatureAIRegistry.cpp | 1 - src/game/InstanceSaveMgr.cpp | 1 - src/game/Level2.cpp | 1 - src/game/ObjectAccessor.cpp | 1 - src/game/Player.cpp | 1 - src/game/SpellEffects.cpp | 2 -- src/game/WorldSession.cpp | 3 +-- 7 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/game/CreatureAIRegistry.cpp b/src/game/CreatureAIRegistry.cpp index 7790ff992..fa14bbe43 100644 --- a/src/game/CreatureAIRegistry.cpp +++ b/src/game/CreatureAIRegistry.cpp @@ -16,7 +16,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "CreatureAIRegistry.h" #include "NullCreatureAI.h" #include "ReactorAI.h" #include "AggressorAI.h" diff --git a/src/game/InstanceSaveMgr.cpp b/src/game/InstanceSaveMgr.cpp index 6c51b2024..cc7b0b116 100644 --- a/src/game/InstanceSaveMgr.cpp +++ b/src/game/InstanceSaveMgr.cpp @@ -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" diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp index be925db6b..a98131145 100644 --- a/src/game/Level2.cpp +++ b/src/game/Level2.cpp @@ -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" diff --git a/src/game/ObjectAccessor.cpp b/src/game/ObjectAccessor.cpp index 8359bd2b9..6750f023b 100644 --- a/src/game/ObjectAccessor.cpp +++ b/src/game/ObjectAccessor.cpp @@ -23,7 +23,6 @@ #include "Creature.h" #include "GameObject.h" #include "DynamicObject.h" -#include "Corpse.h" #include "WorldSession.h" #include "WorldPacket.h" #include "Item.h" diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 217a153da..f6547288c 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -21,7 +21,6 @@ #include "Database/DatabaseEnv.h" #include "Log.h" #include "Opcodes.h" -#include "ObjectMgr.h" #include "SpellMgr.h" #include "World.h" #include "WorldPacket.h" diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index b9151f3b9..aba08adce 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -17,7 +17,6 @@ */ #include "Common.h" -#include "SharedDefines.h" #include "Database/DatabaseEnv.h" #include "WorldPacket.h" #include "WorldSession.h" @@ -30,7 +29,6 @@ #include "Player.h" #include "SkillExtraItems.h" #include "Unit.h" -#include "CreatureAI.h" #include "Spell.h" #include "DynamicObject.h" #include "SpellAuras.h" diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp index 73f622d6d..ab27d928d 100644 --- a/src/game/WorldSession.cpp +++ b/src/game/WorldSession.cpp @@ -20,12 +20,11 @@ \ingroup u2w */ -#include "WorldSocket.h" +#include "WorldSocket.h" // must be first to make ACE happy with ACE includes in it #include "Common.h" #include "Database/DatabaseEnv.h" #include "Log.h" #include "Opcodes.h" -#include "WorldSocket.h" #include "WorldPacket.h" #include "WorldSession.h" #include "Player.h" -- 2.11.4.GIT