Commit 1d3f440c authored by Robert Maynard's avatar Robert Maynard

VTK-m: Consistently use the free standing CastAndCall function

The free standing function allows for us to change the CastAndCall
implementation details in the future inside of VTK-m without having to
also update VTK at the same time.
parent 6acd8bb8
......@@ -376,7 +376,8 @@ vtkDataArray* Convert(const vtkm::cont::Field& input)
try
{
vtkm::filter::ApplyPolicy(input, policy).CastAndCall(aConverter);
vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(input, policy),
aConverter);
data = aConverter.Data;
if (data)
{
......@@ -399,7 +400,8 @@ vtkPoints* Convert(const vtkm::cont::CoordinateSystem& input)
vtkPoints* points = nullptr;
try
{
vtkm::filter::ApplyPolicy(input, policy).CastAndCall(aConverter);
vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(input, policy),
aConverter);
vtkDataArray* pdata = aConverter.Data;
points = vtkPoints::New();
points->SetData(pdata);
......
......@@ -371,7 +371,8 @@ bool Convert(const vtkm::cont::DynamicCellSet& toConvert, vtkCellArray* cells,
vtkmOutputFilterPolicy policy;
bool didConversion = false;
CellSetConverter cConverter(&didConversion, cells, types, locations);
vtkm::filter::ApplyPolicy(toConvert, policy).CastAndCall(cConverter);
vtkm::cont::CastAndCall(vtkm::filter::ApplyPolicy(toConvert, policy),
cConverter);
return didConversion;
}
}
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