Merge pull request #2576 from akortunov/warnfix

Fix warnings about variable re-declaration
pull/556/head
Alexei Dobrohotov 5 years ago committed by GitHub
commit 7488f402d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -359,16 +359,16 @@ void CSVRender::TerrainShapeMode::applyTerrainEditChanges()
if (i < ESM::Land::LAND_SIZE - 1) v1.z() = landShapePointer[j * ESM::Land::LAND_SIZE + i + 1] - landShapePointer[j * ESM::Land::LAND_SIZE + i];
else
{
std::string cellId = CSMWorld::CellCoordinates::generateId(cellCoordinates.getX() + 1, cellCoordinates.getY());
if (isLandLoaded(cellId))
std::string shiftedCellId = CSMWorld::CellCoordinates::generateId(cellCoordinates.getX() + 1, cellCoordinates.getY());
if (isLandLoaded(shiftedCellId))
v1.z() = landRightShapePointer[j * ESM::Land::LAND_SIZE + 1] - landShapePointer[j * ESM::Land::LAND_SIZE + i];
}
if (j < ESM::Land::LAND_SIZE - 1) v2.z() = landShapePointer[(j + 1) * ESM::Land::LAND_SIZE + i] - landShapePointer[j * ESM::Land::LAND_SIZE + i];
else
{
std::string cellId = CSMWorld::CellCoordinates::generateId(cellCoordinates.getX(), cellCoordinates.getY() + 1);
if (isLandLoaded(cellId))
std::string shiftedCellId = CSMWorld::CellCoordinates::generateId(cellCoordinates.getX(), cellCoordinates.getY() + 1);
if (isLandLoaded(shiftedCellId))
v2.z() = landDownShapePointer[ESM::Land::LAND_SIZE + i] - landShapePointer[j * ESM::Land::LAND_SIZE + i];
}

Loading…
Cancel
Save