mirror of https://github.com/CGAL/cgal
deallocate is only called if the number of curves is not 0
This commit is contained in:
parent
62644a62aa
commit
1fa107c8c4
|
|
@ -115,8 +115,9 @@ public:
|
||||||
this->m_visitor->before_sweep();
|
this->m_visitor->before_sweep();
|
||||||
// Allocate all of the Subcurve objects as one block.
|
// Allocate all of the Subcurve objects as one block.
|
||||||
this->m_num_of_subCurves = static_cast<unsigned int>(std::distance (curves_begin, curves_end));
|
this->m_num_of_subCurves = static_cast<unsigned int>(std::distance (curves_begin, curves_end));
|
||||||
this->m_subCurves =
|
if (this->m_num_of_subCurves > 0)
|
||||||
this->m_subCurveAlloc.allocate (this->m_num_of_subCurves);
|
this->m_subCurves =
|
||||||
|
this->m_subCurveAlloc.allocate (this->m_num_of_subCurves);
|
||||||
|
|
||||||
this->m_curves_pair_set.resize (2 * this->m_num_of_subCurves);
|
this->m_curves_pair_set.resize (2 * this->m_num_of_subCurves);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue