diff --git a/GeoLib/GEOObjects.cpp b/GeoLib/GEOObjects.cpp index ed604b9a56e9850ba5621491fb7cd53ea2b2fa9b..09a105553b8669900c71b11f9518413b268cd224 100644 --- a/GeoLib/GEOObjects.cpp +++ b/GeoLib/GEOObjects.cpp @@ -23,6 +23,10 @@ namespace GeoLib { +void markUnusedPoints(GEOObjects const& geo_objects, + std::string const& geo_name, + std::vector<bool>& transfer_pnts); + GEOObjects::GEOObjects() = default; GEOObjects::~GEOObjects() @@ -651,10 +655,12 @@ void GEOObjects::renameGeometry(std::string const& old_name, } } -void GEOObjects::markUnusedPoints(std::string const& geo_name, - std::vector<bool>& transfer_pnts) const +void markUnusedPoints(GEOObjects const& geo_objects, + std::string const& geo_name, + std::vector<bool>& transfer_pnts) { - GeoLib::PolylineVec const* const ply_obj(getPolylineVecObj(geo_name)); + GeoLib::PolylineVec const* const ply_obj( + geo_objects.getPolylineVecObj(geo_name)); if (ply_obj) { std::vector<GeoLib::Polyline*> const& lines(*ply_obj->getVector()); @@ -668,7 +674,8 @@ void GEOObjects::markUnusedPoints(std::string const& geo_name, } } - GeoLib::SurfaceVec const* const sfc_obj(getSurfaceVecObj(geo_name)); + GeoLib::SurfaceVec const* const sfc_obj( + geo_objects.getSurfaceVecObj(geo_name)); if (sfc_obj) { std::vector<GeoLib::Surface*> const& surfaces = *sfc_obj->getVector(); @@ -706,7 +713,7 @@ int GEOObjects::geoPointsToStations(std::string const& geo_name, std::vector<bool> transfer_pnts(n_pnts, true); if (only_unused_pnts) { - markUnusedPoints(geo_name, transfer_pnts); + markUnusedPoints(*this, geo_name, transfer_pnts); } auto stations = std::make_unique<std::vector<GeoLib::Point*>>(); diff --git a/GeoLib/GEOObjects.h b/GeoLib/GEOObjects.h index e8a6098e95695fea186c82223060e078bd9f10b6..3e42d9cce68b3a5a393a9bb3720d46bf24dc68ec 100644 --- a/GeoLib/GEOObjects.h +++ b/GeoLib/GEOObjects.h @@ -371,8 +371,5 @@ private: void mergeSurfaces(std::vector<std::string> const& geo_names, std::string const& merged_geo_name, std::vector<std::size_t> const& pnt_offsets); - - void markUnusedPoints(std::string const& geo_name, - std::vector<bool>& transfer_pnts) const; }; } // namespace GeoLib