[geos-commits] [SCM] GEOS branch master updated. bc180e14fab95c77044647525e0854fbf98a8200
git at osgeo.org
git at osgeo.org
Sun Nov 24 18:34:10 PST 2019
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, master has been updated
via bc180e14fab95c77044647525e0854fbf98a8200 (commit)
via e6039ad63ea69ffe19ac078a73e676da00d7f094 (commit)
from 9e46b935f9896262a1bc8c2fb7cd983f3569bef1 (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 bc180e14fab95c77044647525e0854fbf98a8200
Author: Daniel Baston <dbaston at gmail.com>
Date: Sun Nov 24 21:32:48 2019 -0500
Clear unused variable warning
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index a4aa958..66d9373 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -485,6 +485,7 @@ extern "C" {
GEOSFree_r(GEOSContextHandle_t extHandle, void* buffer)
{
assert(nullptr != extHandle);
+ geos::ignore_unused_variable_warning(extHandle);
free(buffer);
}
commit e6039ad63ea69ffe19ac078a73e676da00d7f094
Author: Daniel Baston <dbaston at gmail.com>
Date: Sun Nov 24 21:32:34 2019 -0500
Clear signed->unsigned warnings in CAPI
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index 80b81aa..a4aa958 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -1392,7 +1392,10 @@ extern "C" {
GEOSGetGeometryN_r(GEOSContextHandle_t extHandle, const Geometry* g1, int n)
{
return execute(extHandle, [&]() {
- return g1->getGeometryN(n);
+ if(n < 0) {
+ throw IllegalArgumentException("Index must be non-negative.");
+ }
+ return g1->getGeometryN(static_cast<size_t>(n));
});
}
@@ -1410,7 +1413,10 @@ extern "C" {
if(!ls) {
throw IllegalArgumentException("Argument is not a LineString");
}
- return ls->getPointN(n).release();
+ if(n < 0) {
+ throw IllegalArgumentException("Index must be non-negative.");
+ }
+ return ls->getPointN(static_cast<size_t>(n)).release();
});
}
@@ -1595,7 +1601,10 @@ extern "C" {
if(!p) {
throw IllegalArgumentException("Invalid argument (must be a Polygon)");
}
- return p->getInteriorRingN(n);
+ if(n < 0) {
+ throw IllegalArgumentException("Index must be non-negative.");
+ }
+ return p->getInteriorRingN(static_cast<size_t>(n));
});
}
-----------------------------------------------------------------------
Summary of changes:
capi/geos_ts_c.cpp | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list