geom: delete rval constructors for samplers
Samplers tend to hold a const reference to the relevant data and so we want to ensure it's not possible to inadvertantly pass in a reference to data that is going out of scope.
This commit is contained in:
parent
1e0a87d5df
commit
532bd3b706
@ -148,6 +148,7 @@ namespace cruft::geom::sample {
|
||||
public:
|
||||
using shape_type = aabb<S,T>;
|
||||
|
||||
volume (shape_type&&);
|
||||
volume (shape_type const &target):
|
||||
m_target (target)
|
||||
{ ; }
|
||||
|
@ -152,6 +152,7 @@ namespace cruft::geom::sample {
|
||||
public:
|
||||
using shape_type = ellipse<2,T>;
|
||||
|
||||
volume (shape_type &&) = delete;
|
||||
volume (shape_type const &target):
|
||||
m_target (target)
|
||||
{ ; }
|
||||
|
@ -49,7 +49,10 @@ namespace cruft::geom::sample {
|
||||
template <typename ShapeT>
|
||||
class volume {
|
||||
public:
|
||||
explicit volume (ShapeT const &target):
|
||||
using shape_type = ShapeT;
|
||||
|
||||
explicit volume (shape_type&&) = delete;
|
||||
explicit volume (shape_type const &target):
|
||||
m_target (target)
|
||||
{ ; }
|
||||
|
||||
@ -82,6 +85,7 @@ namespace cruft::geom::sample {
|
||||
public:
|
||||
using shape_type = extent<S,T>;
|
||||
|
||||
explicit volume (shape_type&&) = delete;
|
||||
explicit volume (shape_type const &target):
|
||||
m_target (target)
|
||||
{ ; }
|
||||
|
Loading…
Reference in New Issue
Block a user