diff --git a/apps/openmw/mwmechanics/pathgrid.cpp b/apps/openmw/mwmechanics/pathgrid.cpp index 83ee86db5..ec647c1cb 100644 --- a/apps/openmw/mwmechanics/pathgrid.cpp +++ b/apps/openmw/mwmechanics/pathgrid.cpp @@ -250,12 +250,9 @@ namespace MWMechanics } int graphSize = mGraph.size(); - std::vector gScore; - gScore.resize(graphSize, -1); - std::vector fScore; - fScore.resize(graphSize, -1); - std::vector graphParent; - graphParent.resize(graphSize, -1); + std::vector gScore (graphSize, -1); + std::vector fScore (graphSize, -1); + std::vector graphParent (graphSize, -1); // gScore & fScore keep costs for each pathgrid point in mPoints gScore[start] = 0;