Fix clang warnings

This commit is contained in:
joris 2013-05-06 20:18:00 +02:00
parent f7a5a173f7
commit da22b538d9
4 changed files with 5 additions and 14 deletions

View file

@ -116,14 +116,14 @@ class WallFinder
{
public:
WallFinder(const CUnit &unit, int maxDist, Vec2i *resultPos) :
unit(unit),
// unit(unit),
maxDist(maxDist),
movemask(unit.Type->MovementMask & ~(MapFieldLandUnit | MapFieldAirUnit | MapFieldSeaUnit)),
resultPos(resultPos)
{}
VisitResult Visit(TerrainTraversal &terrainTraversal, const Vec2i &pos, const Vec2i &from);
private:
const CUnit &unit;
// const CUnit &unit;
int maxDist;
int movemask;
Vec2i *resultPos;
@ -213,12 +213,12 @@ class ReachableTerrainMarker
{
public:
ReachableTerrainMarker(const CUnit &unit) :
unit(unit),
// unit(unit),
movemask(unit.Type->MovementMask & ~(MapFieldLandUnit | MapFieldAirUnit | MapFieldSeaUnit))
{}
VisitResult Visit(TerrainTraversal &terrainTraversal, const Vec2i &pos, const Vec2i &from);
private:
const CUnit &unit;
// const CUnit &unit;
int movemask;
};

View file

@ -40,15 +40,10 @@
class Spell_Teleport : public SpellActionType
{
public:
Spell_Teleport() : SpellActionType(1), UnitType(NULL), TTL(0), RequireCorpse(0) {};
Spell_Teleport() : SpellActionType(1) {}
virtual int Cast(CUnit &caster, const SpellType &spell,
CUnit *target, const Vec2i &goalPos);
virtual void Parse(lua_State *l, int startIndex, int endIndex);
private:
CUnitType *UnitType; /// Type of unit to be summoned.
int TTL; /// Time to live for summoned unit. 0 means infinite
int RequireCorpse; /// Corpse consumed while summoning.
};

View file

@ -294,8 +294,6 @@ public:
int getPercent() const;
private:
int width; /// width of the widget.
int height; /// height of the widget.
std::string caption; /// caption of the widget.
unsigned int percent; /// percent value of the widget.
};

View file

@ -310,7 +310,6 @@ public:
resinfo(*worker.Type->ResInfo[resource]),
deposit(deposit),
movemask(worker.Type->MovementMask & ~(MapFieldLandUnit | MapFieldAirUnit | MapFieldSeaUnit)),
resource(resource),
maxRange(maxRange),
check_usage(check_usage),
res_finder(resource, 1),
@ -348,7 +347,6 @@ private:
const ResourceInfo &resinfo;
const CUnit *deposit;
unsigned int movemask;
int resource;
int maxRange;
bool check_usage;
CResourceFinder res_finder;