From da4abcd7c1997806ae6718cf13a4aac42ebe3893 Mon Sep 17 00:00:00 2001 From: Nelsson Huotari Date: Fri, 4 Oct 2019 00:42:16 +0300 Subject: [PATCH] std::set to std::unique and erase. --- apps/opencs/view/render/terrainshapemode.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/opencs/view/render/terrainshapemode.cpp b/apps/opencs/view/render/terrainshapemode.cpp index 0ce009a365..bb01247ddb 100644 --- a/apps/opencs/view/render/terrainshapemode.cpp +++ b/apps/opencs/view/render/terrainshapemode.cpp @@ -247,8 +247,7 @@ void CSVRender::TerrainShapeMode::dragWheel (int diff, double speedFactor) void CSVRender::TerrainShapeMode::applyTerrainEditChanges() { std::sort(mAlteredCells.begin(), mAlteredCells.end()); - std::set removeDuplicates(mAlteredCells.begin(), mAlteredCells.end()); - mAlteredCells.assign(removeDuplicates.begin(), removeDuplicates.end()); + mAlteredCells.erase(std::unique(mAlteredCells.begin(), mAlteredCells.end()), mAlteredCells.end()); CSMDoc::Document& document = getWorldspaceWidget().getDocument(); CSMWorld::IdTable& landTable = dynamic_cast (