mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
use rvalue ref for parameter
This commit is contained in:
parent
61c002072f
commit
50a9efc2f5
@ -82,8 +82,7 @@ void ScalarRenderer::SetInput(vtkm::cont::DataSet& dataSet)
|
||||
auto triIntersector = std::make_unique<raytracing::TriangleIntersector>();
|
||||
triIntersector->SetData(coords, triExtractor.GetTriangles());
|
||||
this->Internals->ShapeBounds = triIntersector->GetShapeBounds();
|
||||
this->Internals->Tracer.SetShapeIntersector(std::unique_ptr<raytracing::ShapeIntersector>{
|
||||
static_cast<raytracing::ShapeIntersector*>(triIntersector.release()) });
|
||||
this->Internals->Tracer.SetShapeIntersector(std::move(triIntersector));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ public:
|
||||
}; //class WriteDepthBuffer
|
||||
} // namespace detail
|
||||
|
||||
void ScalarRenderer::SetShapeIntersector(std::unique_ptr<ShapeIntersector> intersector)
|
||||
void ScalarRenderer::SetShapeIntersector(std::unique_ptr<ShapeIntersector>&& intersector)
|
||||
{
|
||||
Intersector = std::move(intersector);
|
||||
IntersectorValid = true;
|
||||
|
@ -48,7 +48,7 @@ protected:
|
||||
|
||||
public:
|
||||
VTKM_CONT
|
||||
void SetShapeIntersector(std::unique_ptr<ShapeIntersector> intersector);
|
||||
void SetShapeIntersector(std::unique_ptr<ShapeIntersector>&& intersector);
|
||||
|
||||
VTKM_CONT
|
||||
void AddField(const vtkm::cont::Field& scalarField);
|
||||
|
Loading…
Reference in New Issue
Block a user