mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
COMP: no vtkDataArray::Fill() method prior to VTK-8 (fixes #1156)
This commit is contained in:
@ -224,7 +224,15 @@ Foam::vtk::Tools::zeroField
|
|||||||
data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents));
|
data->SetNumberOfComponents(static_cast<int>(pTraits<Type>::nComponents));
|
||||||
data->SetNumberOfTuples(size);
|
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);
|
data->Fill(0);
|
||||||
|
#endif
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user