1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Make gcc happy

This commit is contained in:
AlexVinS 2014-05-25 13:02:15 +04:00
parent 69457dbd75
commit c40c79fa94
4 changed files with 8 additions and 8 deletions

View File

@ -306,12 +306,12 @@ int3 CRmgTemplateZone::getPos()
{ {
return pos; return pos;
} }
void CRmgTemplateZone::setPos(int3 &Pos) void CRmgTemplateZone::setPos(const int3 &Pos)
{ {
pos = Pos; pos = Pos;
} }
void CRmgTemplateZone::addTile (int3 &pos) void CRmgTemplateZone::addTile (const int3 &pos)
{ {
tileinfo[pos] = CTileInfo(); tileinfo[pos] = CTileInfo();
} }

View File

@ -103,9 +103,9 @@ public:
float3 getCenter() const; float3 getCenter() const;
void setCenter(float3 f); void setCenter(float3 f);
int3 getPos(); int3 getPos();
void setPos(int3 &pos); void setPos(const int3 &pos);
void addTile (int3 &pos); void addTile (const int3 &pos);
void setShape(std::vector<int3> shape); void setShape(std::vector<int3> shape);
bool fill(CMapGenerator* gen); bool fill(CMapGenerator* gen);

View File

@ -33,7 +33,7 @@ CZonePlacer::~CZonePlacer()
} }
int3 CZonePlacer::cords (float3 f) const int3 CZonePlacer::cords (const float3 f) const
{ {
return int3(std::max(0.f, (f.x * gen->map->width)-1), std::max(0.f, (f.y * gen->map->height-1)), f.z); return int3(std::max(0.f, (f.x * gen->map->width)-1), std::max(0.f, (f.y * gen->map->height-1)), f.z);
} }
@ -160,7 +160,7 @@ void CZonePlacer::placeZones(shared_ptr<CMapGenOptions> mapGenOptions, CRandomGe
} }
} }
float CZonePlacer::metric (int3 &A, int3 &B) const float CZonePlacer::metric (const int3 &A, const int3 &B) const
{ {
/* /*

View File

@ -39,8 +39,8 @@ class CZonePlacer
{ {
public: public:
explicit CZonePlacer(CMapGenerator * gen); explicit CZonePlacer(CMapGenerator * gen);
int3 cords (float3 f) const; int3 cords (const float3 f) const;
float metric (int3 &a, int3 &b) const; float metric (const int3 &a, const int3 &b) const;
~CZonePlacer(); ~CZonePlacer();
void placeZones(shared_ptr<CMapGenOptions> mapGenOptions, CRandomGenerator * rand); void placeZones(shared_ptr<CMapGenOptions> mapGenOptions, CRandomGenerator * rand);