From ea858d8402730aaee6c7cb501b989b799985fa47 Mon Sep 17 00:00:00 2001 From: Joris <joris.dauphin@gmail.com> Date: Mon, 11 Jun 2012 12:52:48 +0200 Subject: [PATCH] Clean up : Remove unused function, Remove unneeded include. --- src/unit/unit_find.cpp | 52 ++++++------------------------------------ 1 file changed, 7 insertions(+), 45 deletions(-) diff --git a/src/unit/unit_find.cpp b/src/unit/unit_find.cpp index 07e9c8c20..40642c2de 100644 --- a/src/unit/unit_find.cpp +++ b/src/unit/unit_find.cpp @@ -39,53 +39,16 @@ #include <limits.h> #include "stratagus.h" -#include "map.h" -#include "video.h" -#include "sound.h" -#include "unitsound.h" -#include "unittype.h" -#include "actions.h" -#include "player.h" -#include "missile.h" + #include "unit.h" -#include "interface.h" -#include "tileset.h" + +#include "actions.h" +#include "map.h" +#include "missile.h" #include "pathfinder.h" +#include "player.h" #include "spells.h" - -/*---------------------------------------------------------------------------- --- Defines -----------------------------------------------------------------------------*/ - -/*---------------------------------------------------------------------------- --- Local Data -----------------------------------------------------------------------------*/ - -/*---------------------------------------------------------------------------- --- Functions -----------------------------------------------------------------------------*/ - -/** -** Find all units of type. -** -** @param type type of unit requested -** @param table table in which we have to store the units -** -** @return Returns the number of units found. -*/ -int FindUnitsByType(const CUnitType &type, CUnit **table) -{ - int num = 0; - - for (int i = 0; i < NumUnits; ++i) { - CUnit *unit = Units[i]; - - if (unit->Type == &type && !unit->IsUnusable()) { - table[num++] = unit; - } - } - return num; -} +#include "unittype.h" /** ** Find all units of type. @@ -104,7 +67,6 @@ void FindUnitsByType(const CUnitType &type, std::vector<CUnit *> &units) } } - /** ** Find all units of type. **