1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 09:23:51 +00:00

use std::fill instead of for

This commit is contained in:
Nelsson Huotari 2019-10-02 15:00:12 +03:00
parent 3599e804e1
commit 69083369f8

View file

@ -50,13 +50,7 @@ namespace CSVRender
void TerrainStorage::resetHeights() void TerrainStorage::resetHeights()
{ {
for (int x = 0; x < ESM::Land::LAND_SIZE; ++x) std::fill(std::begin(mAlteredHeight), std::end(mAlteredHeight), 0);
{
for (int y = 0; y < ESM::Land::LAND_SIZE; ++y)
{
mAlteredHeight[y*ESM::Land::LAND_SIZE + x] = 0;
}
}
} }
float TerrainStorage::getSumOfAlteredAndTrueHeight(int cellX, int cellY, int inCellX, int inCellY) float TerrainStorage::getSumOfAlteredAndTrueHeight(int cellX, int cellY, int inCellX, int inCellY)