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

Fix warning-as-errors.

This commit is contained in:
Tomasz Zieliński 2023-04-19 08:45:23 +02:00
parent d841655c1d
commit c34b1cd713

View File

@ -55,7 +55,6 @@ void CZonePlacer::findPathsBetweenZones()
for (const auto& zone : zones)
{
int start = zone.first;
const auto& zone1Ptr = zone.second;
distancesBetweenZones[start][start] = 0; // Distance from a node to itself is 0
std::queue<int> q;
@ -157,7 +156,7 @@ void CZonePlacer::placeOnGrid(CRandomGenerator* rand)
}
break;
case ETemplateZoneType::TREASURE:
if (gridSize && 1) //odd
if (gridSize & 1) //odd
{
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
const float radius = 0.4f;
const float pi2 = 6.28f;
int zonesOnLevel[2] = { 0, 0 };
//even distribution for surface / underground zones. Surface zones always have priority.