[geos-commits] [SCM] GEOS branch main updated. 6c9b94a7d85451c2701dc44bba7e16022b32b12c
git at osgeo.org
git at osgeo.org
Thu Aug 15 16:35:37 PDT 2024
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".
The branch, main has been updated
via 6c9b94a7d85451c2701dc44bba7e16022b32b12c (commit)
from 1821b67432de802ead6f0c655c93e74e03ffd267 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6c9b94a7d85451c2701dc44bba7e16022b32b12c
Author: Even Rouault <even.rouault at spatialys.com>
Date: Fri Aug 16 01:34:55 2024 +0200
Add -Wsuggest-override for gcc, and add missing override qualifiers (#1138)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fb7f4ebd7..d9f332217 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -313,6 +313,10 @@ target_compile_options(geos_developer_cxx_flags
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wno-unknown-warning-option>
)
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 9.2)
+ target_compile_options(geos_developer_cxx_flags INTERFACE -Wsuggest-override)
+endif()
+
#-----------------------------------------------------------------------------
# Define a coverage build
#-----------------------------------------------------------------------------
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index b6efb7e03..ef238229a 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -1629,13 +1629,13 @@ extern "C" {
Geometry*
GEOSGeom_transformXY_r(GEOSContextHandle_t handle, const GEOSGeometry* g, GEOSTransformXYCallback callback, void* userdata) {
- struct TransformFilter : public geos::geom::CoordinateFilter {
+ struct TransformFilter final: public geos::geom::CoordinateFilter {
TransformFilter(GEOSTransformXYCallback p_callback,
void* p_userdata) :
m_callback(p_callback),
m_userdata(p_userdata) {}
- void filter_rw(CoordinateXY* c) const final {
+ void filter_rw(CoordinateXY* c) const override {
if (!m_callback(&(c->x), &(c->y), m_userdata)) {
throw std::runtime_error(std::string("Failed to transform coordinates."));
}
diff --git a/include/geos/algorithm/hull/HullTriangulation.h b/include/geos/algorithm/hull/HullTriangulation.h
index f6db2eac8..05808c842 100644
--- a/include/geos/algorithm/hull/HullTriangulation.h
+++ b/include/geos/algorithm/hull/HullTriangulation.h
@@ -124,7 +124,7 @@ public:
: triList(p_triList)
{};
- void visit(std::array<QuadEdge*, 3>& triEdges);
+ void visit(std::array<QuadEdge*, 3>& triEdges) override;
}; // HullTriVisitor
diff --git a/include/geos/precision/PointwisePrecisionReducerTransformer.h b/include/geos/precision/PointwisePrecisionReducerTransformer.h
index 1b5df1db4..9ea06717f 100644
--- a/include/geos/precision/PointwisePrecisionReducerTransformer.h
+++ b/include/geos/precision/PointwisePrecisionReducerTransformer.h
@@ -63,7 +63,7 @@ protected:
std::unique_ptr<geom::CoordinateSequence> transformCoordinates(
const geom::CoordinateSequence* coords,
- const geom::Geometry* parent);
+ const geom::Geometry* parent) override;
};
diff --git a/src/operation/overlayng/OverlayPoints.cpp b/src/operation/overlayng/OverlayPoints.cpp
index c1c37799c..6afe7a211 100644
--- a/src/operation/overlayng/OverlayPoints.cpp
+++ b/src/operation/overlayng/OverlayPoints.cpp
@@ -27,14 +27,14 @@ namespace geos { // geos
namespace operation { // geos.operation
namespace overlayng { // geos.operation.overlayng
-struct PointExtractingFilter: public GeometryComponentFilter {
+struct PointExtractingFilter final: public GeometryComponentFilter {
PointExtractingFilter(std::map<CoordinateXY, std::unique_ptr<Point>>& p_ptMap, const PrecisionModel* p_pm)
: ptMap(p_ptMap), pm(p_pm)
{}
void
- filter_ro(const Geometry* geom)
+ filter_ro(const Geometry* geom) override
{
if (geom->getGeometryTypeId() != GEOS_POINT) return;
diff --git a/util/geosop/GeosOp.cpp b/util/geosop/GeosOp.cpp
index 5774d7a77..43a453b3a 100644
--- a/util/geosop/GeosOp.cpp
+++ b/util/geosop/GeosOp.cpp
@@ -189,8 +189,8 @@ public:
:m_thousands_sep(p_thousands_sep),
m_grouping(p_grouping){}
protected:
- char do_thousands_sep() const {return m_thousands_sep;}
- std::string do_grouping() const {return m_grouping;}
+ char do_thousands_sep() const override {return m_thousands_sep;}
+ std::string do_grouping() const override {return m_grouping;}
private:
char m_thousands_sep;
std::string m_grouping;
-----------------------------------------------------------------------
Summary of changes:
CMakeLists.txt | 4 ++++
capi/geos_ts_c.cpp | 4 ++--
include/geos/algorithm/hull/HullTriangulation.h | 2 +-
include/geos/precision/PointwisePrecisionReducerTransformer.h | 2 +-
src/operation/overlayng/OverlayPoints.cpp | 4 ++--
util/geosop/GeosOp.cpp | 4 ++--
6 files changed, 12 insertions(+), 8 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list