mirror of https://github.com/CGAL/cgal
Fix: use a pointer instead of a copy of Flat_orientation_d
Note: the previous commit fixing this problem (using construct_flat_orientation_d_object()) was not compilable
This commit is contained in:
parent
3e7422dc75
commit
2258e7a810
|
|
@ -174,7 +174,7 @@ public:
|
||||||
|
|
||||||
Delaunay_triangulation(
|
Delaunay_triangulation(
|
||||||
int dim,
|
int dim,
|
||||||
const std::pair<int, Flat_orientation_d> &preset_flat_orientation,
|
const std::pair<int, const Flat_orientation_d *> &preset_flat_orientation,
|
||||||
const Geom_traits k = Geom_traits())
|
const Geom_traits k = Geom_traits())
|
||||||
: Base(dim, preset_flat_orientation, k)
|
: Base(dim, preset_flat_orientation, k)
|
||||||
{
|
{
|
||||||
|
|
@ -452,11 +452,13 @@ Delaunay_triangulation<DCTraits, TDS>
|
||||||
typedef typename Dark_triangulation::Facet Dark_facet;
|
typedef typename Dark_triangulation::Facet Dark_facet;
|
||||||
typedef typename Dark_triangulation::Vertex_handle Dark_v_handle;
|
typedef typename Dark_triangulation::Vertex_handle Dark_v_handle;
|
||||||
typedef typename Dark_triangulation::Full_cell_handle Dark_s_handle;
|
typedef typename Dark_triangulation::Full_cell_handle Dark_s_handle;
|
||||||
Dark_triangulation dark_side(maximal_dimension(),
|
|
||||||
|
Dark_triangulation dark_side(
|
||||||
|
maximal_dimension(),
|
||||||
flat_orientation_ ?
|
flat_orientation_ ?
|
||||||
std::make_pair(current_dimension(), flat_orientation_.get())
|
std::make_pair(current_dimension(), &flat_orientation_.get())
|
||||||
: std::make_pair(std::numeric_limits<int>::max(),
|
: std::make_pair<int, const Flat_orientation_d *>(std::numeric_limits<int>::max(), NULL) );
|
||||||
geom_traits().construct_flat_orientation_d_object()) );
|
|
||||||
Dark_s_handle dark_s;
|
Dark_s_handle dark_s;
|
||||||
Dark_v_handle dark_v;
|
Dark_v_handle dark_v;
|
||||||
typedef std::map<Vertex_handle, Dark_v_handle> Vertex_map;
|
typedef std::map<Vertex_handle, Dark_v_handle> Vertex_map;
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,10 @@ protected:
|
||||||
void reset_flat_orientation()
|
void reset_flat_orientation()
|
||||||
{
|
{
|
||||||
if (current_dimension() == preset_flat_orientation_.first)
|
if (current_dimension() == preset_flat_orientation_.first)
|
||||||
flat_orientation_ = preset_flat_orientation_.second;
|
{
|
||||||
|
CGAL_assertion(preset_flat_orientation_.second != NULL);
|
||||||
|
flat_orientation_ = *preset_flat_orientation_.second;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
flat_orientation_ = boost::none;
|
flat_orientation_ = boost::none;
|
||||||
}
|
}
|
||||||
|
|
@ -146,7 +149,7 @@ protected: // DATA MEMBERS
|
||||||
Vertex_handle infinity_;
|
Vertex_handle infinity_;
|
||||||
mutable std::vector<Oriented_side> orientations_;
|
mutable std::vector<Oriented_side> orientations_;
|
||||||
mutable boost::optional<Flat_orientation_d> flat_orientation_;
|
mutable boost::optional<Flat_orientation_d> flat_orientation_;
|
||||||
std::pair<int, Flat_orientation_d> preset_flat_orientation_;
|
std::pair<int, const Flat_orientation_d *> preset_flat_orientation_;
|
||||||
// for stochastic walk in the locate() function:
|
// for stochastic walk in the locate() function:
|
||||||
mutable Random rng_;
|
mutable Random rng_;
|
||||||
#ifdef CGAL_TRIANGULATION_STATISTICS
|
#ifdef CGAL_TRIANGULATION_STATISTICS
|
||||||
|
|
@ -190,9 +193,7 @@ public:
|
||||||
, kernel_(k)
|
, kernel_(k)
|
||||||
, infinity_()
|
, infinity_()
|
||||||
, rng_((long)0)
|
, rng_((long)0)
|
||||||
, preset_flat_orientation_(
|
, preset_flat_orientation_(std::numeric_limits<int>::max(), NULL)
|
||||||
std::numeric_limits<int>::max(),
|
|
||||||
geom_traits().construct_flat_orientation_d_object())
|
|
||||||
#ifdef CGAL_TRIANGULATION_STATISTICS
|
#ifdef CGAL_TRIANGULATION_STATISTICS
|
||||||
,walk_size_(0)
|
,walk_size_(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -201,8 +202,8 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Triangulation(
|
Triangulation(
|
||||||
int dim,
|
int dim,
|
||||||
const std::pair<int, Flat_orientation_d> &preset_flat_orientation,
|
const std::pair<int, const Flat_orientation_d *> &preset_flat_orientation,
|
||||||
const Geom_traits k = Geom_traits())
|
const Geom_traits k = Geom_traits())
|
||||||
: tds_(dim)
|
: tds_(dim)
|
||||||
, kernel_(k)
|
, kernel_(k)
|
||||||
|
|
@ -221,9 +222,7 @@ public:
|
||||||
, kernel_(t2.kernel_)
|
, kernel_(t2.kernel_)
|
||||||
, infinity_()
|
, infinity_()
|
||||||
, rng_(t2.rng_)
|
, rng_(t2.rng_)
|
||||||
, preset_flat_orientation_(
|
, preset_flat_orientation_(std::numeric_limits<int>::max(), NULL)
|
||||||
std::numeric_limits<int>::max(),
|
|
||||||
geom_traits().construct_flat_orientation_d_object())
|
|
||||||
#ifdef CGAL_TRIANGULATION_STATISTICS
|
#ifdef CGAL_TRIANGULATION_STATISTICS
|
||||||
,walk_size_(t2.walk_size_)
|
,walk_size_(t2.walk_size_)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue