mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
Do not return a reference from ImplicitFunction::PrepareForExecution
This can cause many troubles when passing around in a Variant or across devices.
This commit is contained in:
parent
b0fcab5d7f
commit
6a445ebcf0
@ -83,16 +83,12 @@ public:
|
||||
return reinterpret_cast<const Derived*>(this)->Gradient(Vector(x, y, z));
|
||||
}
|
||||
|
||||
VTKM_CONT const Derived& PrepareForExecution(vtkm::cont::DeviceAdapterId,
|
||||
vtkm::cont::Token&) const
|
||||
VTKM_CONT Derived PrepareForExecution(vtkm::cont::DeviceAdapterId, vtkm::cont::Token&) const
|
||||
{
|
||||
return *reinterpret_cast<const Derived*>(this);
|
||||
}
|
||||
|
||||
VTKM_CONT const Derived& PrepareForControl() const
|
||||
{
|
||||
return *reinterpret_cast<const Derived*>(this);
|
||||
}
|
||||
VTKM_CONT Derived PrepareForControl() const { return *reinterpret_cast<const Derived*>(this); }
|
||||
};
|
||||
|
||||
} // namespace vtkm::internal
|
||||
|
Loading…
Reference in New Issue
Block a user