From b09b2f267077c714cd712dd010b8c9e310c7d446 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Wed, 23 Jun 2021 09:41:15 +0200 Subject: [PATCH] [GL/Polyline] Rm. unused write method and operator<<. --- GeoLib/Polyline.cpp | 15 --------------- GeoLib/Polyline.h | 5 ----- 2 files changed, 20 deletions(-) diff --git a/GeoLib/Polyline.cpp b/GeoLib/Polyline.cpp index 90680354c35..ddc22060d8a 100644 --- a/GeoLib/Polyline.cpp +++ b/GeoLib/Polyline.cpp @@ -36,15 +36,6 @@ Polyline::Polyline(const Polyline& ply) { } -void Polyline::write(std::ostream& os) const -{ - std::size_t size(_ply_pnt_ids.size()); - for (std::size_t k(0); k < size; k++) - { - os << *(_ply_pnts[_ply_pnt_ids[k]]) << "\n"; - } -} - bool Polyline::addPoint(std::size_t pnt_id) { assert(pnt_id < _ply_pnts.size()); @@ -622,12 +613,6 @@ Polyline::SegmentIterator Polyline::SegmentIterator::operator-( return t; } -std::ostream& operator<<(std::ostream& os, const Polyline& pl) -{ - pl.write(os); - return os; -} - bool containsEdge(const Polyline& ply, std::size_t id0, std::size_t id1) { if (id0 == id1) diff --git a/GeoLib/Polyline.h b/GeoLib/Polyline.h index 7fd2f5526bd..731c229b7c3 100644 --- a/GeoLib/Polyline.h +++ b/GeoLib/Polyline.h @@ -105,8 +105,6 @@ public: /// return a geometry type GEOTYPE getGeoType() const override { return GEOTYPE::POLYLINE; } - /** write the points to the stream */ - void write(std::ostream &os) const; /** * Adds an id of a point at the end of the polyline if and only if the @@ -244,9 +242,6 @@ private: LineSegment getSegment(std::size_t i); }; -/** overload the output operator for class Polyline */ -std::ostream& operator<< (std::ostream &os, Polyline const& pl); - bool containsEdge (const Polyline& ply, std::size_t id0, std::size_t id1); /** -- GitLab