Commit 0748a11f authored by Mark Olesen's avatar Mark Olesen
Browse files

COMP: no vtkDataArray::Fill() method prior to VTK-8 (fixes #1156)

parent 0fa923d3
......@@ -224,7 +224,15 @@ Foam::vtk::Tools::zeroField
data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents));
data->SetNumberOfTuples(size);
// Fill() was not available before VTK-8
#if (VTK_MAJOR_VERSION < 8)
for (int i = 0; i < data->GetNumberOfComponents(); ++i)
{
data->FillComponent(i, 0);
}
#else
data->Fill(0);
#endif
return data;
}
......
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