Commit e7da231a authored by Andreas Buykx's avatar Andreas Buykx
Browse files

Using vtkNew instead of raw pointers

parent 7fec293a
......@@ -35,6 +35,7 @@
#include "vtkVoxel.h"
#include "vtkWedge.h"
#include "vtkIncrementalPointLocator.h"
#include "vtkNew.h"
vtkStandardNewMacro(vtkGeometryFilter);
......@@ -718,10 +719,10 @@ void vtkGeometryFilter::UnstructuredGridExecute(vtkDataSet *dataSetInput,
}//if not all visible
// Used for nonlinear cells only
vtkGenericCell *cell = vtkGenericCell::New();
vtkIdList *ipts = vtkIdList::New();
vtkPoints *coords = vtkPoints::New();
vtkIdList *icellIds = vtkIdList::New();;
vtkNew<vtkGenericCell> cell;
vtkNew<vtkIdList> ipts;
vtkNew<vtkPoints> coords;
vtkNew<vtkIdList> icellIds;
// These store the cell ids of the input that map to the
// new vert/line/poly/strip cells, for copying cell data
......@@ -1061,15 +1062,6 @@ void vtkGeometryFilter::UnstructuredGridExecute(vtkDataSet *dataSetInput,
} //if visible
} //for all cells
icellIds->Delete();
icellIds = nullptr;
coords->Delete();
coords = nullptr;
ipts->Delete();
ipts = nullptr;
cell->Delete();
cell = nullptr;
// Update ourselves and release memory
//
output->SetVerts(verts);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment