This commit is contained in:
Andreas Fabri 2024-09-18 16:18:13 +01:00
parent fdbd1af329
commit 6d698871f9
2 changed files with 5 additions and 5 deletions

View File

@ -235,7 +235,8 @@ public:
== Epeck_with_sqrt
*/
template <class PointRange>
Curve(const PointRange& point_range) : prefix_length(point_range.size())
Curve(const PointRange& point_range)
: prefix_length(point_range.size())
{
if constexpr ( ! std::is_floating_point<typename K::FT>::type::value) {
input.reserve(point_range.size());
@ -376,11 +377,11 @@ std::ostream& operator<<(std::ostream& out, const Curve<K>& curve);
template <typename K>
void Curve<K>::push_back(Point const& point)
{
if (prefix_length.size()) {
if (prefix_length.empty()) {
prefix_length.push_back(0);
} else {
auto segment_distance = distance(points.back(), point);
prefix_length.push_back(prefix_length.back() + segment_distance);
} else {
prefix_length.push_back(0);
}
if (points.empty()){
extreme_points = point.bbox();

View File

@ -22,7 +22,6 @@ namespace CGAL {
template < typename FT_, typename Dim_, typename Derived_=Default>
struct Cartesian_base_d : public CGAL_BASE
{
typedef FT_ FT;
constexpr Cartesian_base_d(){}
constexpr Cartesian_base_d(int d):CGAL_BASE(d){}
};