Commit 3798ad82 authored by bonnell's avatar bonnell
Browse files

Fix compile error on Windows. Dynamic arrays cannot be allocated with [] operator.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@12405 18c085ea-50e0-402c-830e-de6fd14e8384
parent 0cc95527
...@@ -1079,7 +1079,7 @@ avtAMRStitchCellFilter::CreateStitchCells(vtkRectilinearGrid *rgrid, ...@@ -1079,7 +1079,7 @@ avtAMRStitchCellFilter::CreateStitchCells(vtkRectilinearGrid *rgrid,
while (tesselationArray3D[tessPos] != -1) while (tesselationArray3D[tessPos] != -1)
{ {
int numVtcs = tesselationArray3D[tessPos++]; int numVtcs = tesselationArray3D[tessPos++];
vtkIdType vPtId[numVtcs]; std::vector<vtkIdType> vPtId(numVtcs);
bool skipCell = false; bool skipCell = false;
for (int vtxNo = 0; vtxNo < numVtcs; ++ vtxNo) for (int vtxNo = 0; vtxNo < numVtcs; ++ vtxNo)
...@@ -1227,11 +1227,11 @@ avtAMRStitchCellFilter::CreateStitchCells(vtkRectilinearGrid *rgrid, ...@@ -1227,11 +1227,11 @@ avtAMRStitchCellFilter::CreateStitchCells(vtkRectilinearGrid *rgrid,
std::cout << std::endl; std::cout << std::endl;
#endif #endif
if (numVtcs == 4) if (numVtcs == 4)
ugrid->InsertNextCell(VTK_TETRA, 4, vPtId); ugrid->InsertNextCell(VTK_TETRA, 4, &vPtId[0]);
else if (numVtcs == 5) else if (numVtcs == 5)
ugrid->InsertNextCell(VTK_PYRAMID, 5, vPtId); ugrid->InsertNextCell(VTK_PYRAMID, 5, &vPtId[0]);
else if (numVtcs == 6) else if (numVtcs == 6)
ugrid->InsertNextCell(VTK_WEDGE, 6, vPtId); ugrid->InsertNextCell(VTK_WEDGE, 6, &vPtId[0]);
else if (numVtcs == 7) else if (numVtcs == 7)
{ {
double centroid[3] = { 0, 0, 0 }; double centroid[3] = { 0, 0, 0 };
...@@ -1262,7 +1262,7 @@ avtAMRStitchCellFilter::CreateStitchCells(vtkRectilinearGrid *rgrid, ...@@ -1262,7 +1262,7 @@ avtAMRStitchCellFilter::CreateStitchCells(vtkRectilinearGrid *rgrid,
ugrid->InsertNextCell(VTK_TETRA, 4, c6); ugrid->InsertNextCell(VTK_TETRA, 4, c6);
} }
else if (numVtcs == 8) else if (numVtcs == 8)
ugrid->InsertNextCell(VTK_HEXAHEDRON, 8, vPtId); ugrid->InsertNextCell(VTK_HEXAHEDRON, 8, &vPtId[0]);
else else
EXCEPTION1(VisItException, "Invalid cell type (internal error)."); EXCEPTION1(VisItException, "Invalid cell type (internal error).");
} }
......
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