From 69083369f869c1bae0ea8b71aab81b078cc80502 Mon Sep 17 00:00:00 2001 From: Nelsson Huotari Date: Wed, 2 Oct 2019 15:00:12 +0300 Subject: [PATCH] use std::fill instead of for --- apps/opencs/view/render/terrainstorage.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/opencs/view/render/terrainstorage.cpp b/apps/opencs/view/render/terrainstorage.cpp index 0eb1f9ab3b..5e4ca1365e 100644 --- a/apps/opencs/view/render/terrainstorage.cpp +++ b/apps/opencs/view/render/terrainstorage.cpp @@ -50,13 +50,7 @@ namespace CSVRender void TerrainStorage::resetHeights() { - for (int x = 0; x < ESM::Land::LAND_SIZE; ++x) - { - for (int y = 0; y < ESM::Land::LAND_SIZE; ++y) - { - mAlteredHeight[y*ESM::Land::LAND_SIZE + x] = 0; - } - } + std::fill(std::begin(mAlteredHeight), std::end(mAlteredHeight), 0); } float TerrainStorage::getSumOfAlteredAndTrueHeight(int cellX, int cellY, int inCellX, int inCellY)