mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Fix warning-as-errors.
This commit is contained in:
@@ -55,7 +55,6 @@ void CZonePlacer::findPathsBetweenZones()
|
|||||||
for (const auto& zone : zones)
|
for (const auto& zone : zones)
|
||||||
{
|
{
|
||||||
int start = zone.first;
|
int start = zone.first;
|
||||||
const auto& zone1Ptr = zone.second;
|
|
||||||
distancesBetweenZones[start][start] = 0; // Distance from a node to itself is 0
|
distancesBetweenZones[start][start] = 0; // Distance from a node to itself is 0
|
||||||
|
|
||||||
std::queue<int> q;
|
std::queue<int> q;
|
||||||
@@ -157,7 +156,7 @@ void CZonePlacer::placeOnGrid(CRandomGenerator* rand)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ETemplateZoneType::TREASURE:
|
case ETemplateZoneType::TREASURE:
|
||||||
if (gridSize && 1) //odd
|
if (gridSize & 1) //odd
|
||||||
{
|
{
|
||||||
x = y = (gridSize / 2);
|
x = y = (gridSize / 2);
|
||||||
}
|
}
|
||||||
@@ -402,9 +401,6 @@ void CZonePlacer::prepareZones(TZoneMap &zones, TZoneVector &zonesVector, const
|
|||||||
{
|
{
|
||||||
std::vector<float> totalSize = { 0, 0 }; //make sure that sum of zone sizes on surface and uderground match size of the map
|
std::vector<float> totalSize = { 0, 0 }; //make sure that sum of zone sizes on surface and uderground match size of the map
|
||||||
|
|
||||||
const float radius = 0.4f;
|
|
||||||
const float pi2 = 6.28f;
|
|
||||||
|
|
||||||
int zonesOnLevel[2] = { 0, 0 };
|
int zonesOnLevel[2] = { 0, 0 };
|
||||||
|
|
||||||
//even distribution for surface / underground zones. Surface zones always have priority.
|
//even distribution for surface / underground zones. Surface zones always have priority.
|
||||||
|
|||||||
Reference in New Issue
Block a user