mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Fixed gcc warnings
This commit is contained in:
parent
f55bfe41d6
commit
f9d9a38e53
@ -774,12 +774,8 @@ std::set<TFaction> CTownHandler::getAllowedFactions(bool withTown /*=true*/) con
|
|||||||
if (withTown)
|
if (withTown)
|
||||||
allowed = getDefaultAllowed();
|
allowed = getDefaultAllowed();
|
||||||
else
|
else
|
||||||
{
|
allowed.resize( factions.size(), true);
|
||||||
for (auto town : factions)
|
|
||||||
{
|
|
||||||
allowed.push_back (true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (size_t i=0; i<allowed.size(); i++)
|
for (size_t i=0; i<allowed.size(); i++)
|
||||||
if (allowed[i])
|
if (allowed[i])
|
||||||
allowedFactions.insert(i);
|
allowedFactions.insert(i);
|
||||||
|
@ -735,7 +735,7 @@ bool CRmgTemplateZone::createRoad(CMapGenerator* gen, const int3& src, const int
|
|||||||
std::map<int3, int3> cameFrom; // The map of navigated nodes.
|
std::map<int3, int3> cameFrom; // The map of navigated nodes.
|
||||||
std::map<int3, float> distances;
|
std::map<int3, float> distances;
|
||||||
|
|
||||||
int3 currentNode = src;
|
//int3 currentNode = src;
|
||||||
gen->setRoad (src, ERoadType::NO_ROAD); //just in case zone guard already has road under it. Road under nodes will be added at very end
|
gen->setRoad (src, ERoadType::NO_ROAD); //just in case zone guard already has road under it. Road under nodes will be added at very end
|
||||||
|
|
||||||
cameFrom[src] = int3(-1, -1, -1); //first node points to finish condition
|
cameFrom[src] = int3(-1, -1, -1); //first node points to finish condition
|
||||||
@ -824,7 +824,7 @@ bool CRmgTemplateZone::connectPath(CMapGenerator* gen, const int3& src, bool onl
|
|||||||
std::map<int3, int3> cameFrom; // The map of navigated nodes.
|
std::map<int3, int3> cameFrom; // The map of navigated nodes.
|
||||||
std::map<int3, float> distances;
|
std::map<int3, float> distances;
|
||||||
|
|
||||||
int3 currentNode = src;
|
//int3 currentNode = src;
|
||||||
|
|
||||||
cameFrom[src] = int3(-1, -1, -1); //first node points to finish condition
|
cameFrom[src] = int3(-1, -1, -1); //first node points to finish condition
|
||||||
distances[src] = 0;
|
distances[src] = 0;
|
||||||
@ -866,7 +866,7 @@ bool CRmgTemplateZone::connectPath(CMapGenerator* gen, const int3& src, bool onl
|
|||||||
return;
|
return;
|
||||||
if (distance < bestDistanceSoFar || !vstd::contains(closed, pos))
|
if (distance < bestDistanceSoFar || !vstd::contains(closed, pos))
|
||||||
{
|
{
|
||||||
auto obj = gen->map->getTile(pos).topVisitableObj();
|
//auto obj = gen->map->getTile(pos).topVisitableObj();
|
||||||
if (vstd::contains(this->tileinfo, pos))
|
if (vstd::contains(this->tileinfo, pos))
|
||||||
{
|
{
|
||||||
cameFrom[pos] = currentNode;
|
cameFrom[pos] = currentNode;
|
||||||
@ -902,7 +902,7 @@ bool CRmgTemplateZone::connectWithCenter(CMapGenerator* gen, const int3& src, bo
|
|||||||
std::map<int3, int3> cameFrom; // The map of navigated nodes.
|
std::map<int3, int3> cameFrom; // The map of navigated nodes.
|
||||||
std::map<int3, float> distances;
|
std::map<int3, float> distances;
|
||||||
|
|
||||||
int3 currentNode = src;
|
//int3 currentNode = src;
|
||||||
|
|
||||||
cameFrom[src] = int3(-1, -1, -1); //first node points to finish condition
|
cameFrom[src] = int3(-1, -1, -1); //first node points to finish condition
|
||||||
distances[src] = 0;
|
distances[src] = 0;
|
||||||
@ -950,7 +950,7 @@ bool CRmgTemplateZone::connectWithCenter(CMapGenerator* gen, const int3& src, bo
|
|||||||
|
|
||||||
if (distance < bestDistanceSoFar || !vstd::contains(closed, pos))
|
if (distance < bestDistanceSoFar || !vstd::contains(closed, pos))
|
||||||
{
|
{
|
||||||
auto obj = gen->map->getTile(pos).topVisitableObj();
|
//auto obj = gen->map->getTile(pos).topVisitableObj();
|
||||||
if (vstd::contains(this->tileinfo, pos))
|
if (vstd::contains(this->tileinfo, pos))
|
||||||
{
|
{
|
||||||
cameFrom[pos] = currentNode;
|
cameFrom[pos] = currentNode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user