From 9e97f69bed1ddcd632aa94a655fec160efdd9fb8 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <github@naumov.de> Date: Mon, 28 Aug 2023 16:28:38 +0200 Subject: [PATCH] [GL] mergePoints never returns anything but 'true' Removing the return value. --- GeoLib/GEOObjects.cpp | 8 ++------ GeoLib/GEOObjects.h | 3 +-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/GeoLib/GEOObjects.cpp b/GeoLib/GEOObjects.cpp index 6964d6891c1..ad16d68e75d 100644 --- a/GeoLib/GEOObjects.cpp +++ b/GeoLib/GEOObjects.cpp @@ -385,10 +385,7 @@ int GEOObjects::mergeGeometries(std::vector<std::string> const& geo_names, std::vector<std::size_t> pnt_offsets(n_geo_names, 0); - if (!mergePoints(geo_names, merged_geo_name, pnt_offsets)) - { - return 1; - } + mergePoints(geo_names, merged_geo_name, pnt_offsets); mergePolylines(geo_names, merged_geo_name, pnt_offsets); @@ -397,7 +394,7 @@ int GEOObjects::mergeGeometries(std::vector<std::string> const& geo_names, return 0; } -bool GEOObjects::mergePoints(std::vector<std::string> const& geo_names, +void GEOObjects::mergePoints(std::vector<std::string> const& geo_names, std::string& merged_geo_name, std::vector<std::size_t>& pnt_offsets) { @@ -442,7 +439,6 @@ bool GEOObjects::mergePoints(std::vector<std::string> const& geo_names, addPointVec(std::move(merged_points), merged_geo_name, std::move(merged_pnt_names), 1e-6); - return true; } void GEOObjects::mergePolylines(std::vector<std::string> const& geo_names, diff --git a/GeoLib/GEOObjects.h b/GeoLib/GEOObjects.h index 39eb3ea762a..a132ef82062 100644 --- a/GeoLib/GEOObjects.h +++ b/GeoLib/GEOObjects.h @@ -323,9 +323,8 @@ private: * @param merged_geo_name The (new) name of the geometry resulting from * merging. * @param pnt_offsets offsets in the merged vector storing the points - * @return true, if merging the points succeeded, else false */ - bool mergePoints(std::vector<std::string> const& geo_names, + void mergePoints(std::vector<std::string> const& geo_names, std::string& merged_geo_name, std::vector<std::size_t>& pnt_offsets); -- GitLab