[geos-commits] [SCM] GEOS branch main updated. 7f8bc49ce3afbdbd3d510e8e97be530c1206f45a
git at osgeo.org
git at osgeo.org
Mon Sep 20 15:21:23 PDT 2021
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 7f8bc49ce3afbdbd3d510e8e97be530c1206f45a (commit)
via 5e536f4fa9b368c97ed35111a5bea29d9ca06d27 (commit)
from 128f6d9ffeb961b5b8c9baa6651521a88cfdfe35 (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 7f8bc49ce3afbdbd3d510e8e97be530c1206f45a
Merge: 5e536f4 128f6d9
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Sep 20 15:21:19 2021 -0700
Merge branch 'main' of https://git.osgeo.org/gitea/geos/geos into main
commit 5e536f4fa9b368c97ed35111a5bea29d9ca06d27
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Mon Sep 20 15:21:13 2021 -0700
Quiet MSVC compilation warnings from CI
diff --git a/capi/geos_ts_c.cpp b/capi/geos_ts_c.cpp
index ee4beea..f95ca6f 100644
--- a/capi/geos_ts_c.cpp
+++ b/capi/geos_ts_c.cpp
@@ -1430,14 +1430,16 @@ extern "C" {
Geometry*
GEOSUnionCascaded_r(GEOSContextHandle_t extHandle, const Geometry* g1)
{
- // CascadedUnion is the same as UnaryUnion, except that
- // CascadedUnion only works on MultiPolygon, so we just delegate
- // now and retain a check on MultiPolygon type.
- const geos::geom::MultiPolygon *p = dynamic_cast<const geos::geom::MultiPolygon *>(g1);
- if (!p) {
- throw IllegalArgumentException("Invalid argument (must be a MultiPolygon)");
- }
- return GEOSUnaryUnion_r(extHandle, g1);
+ return execute(extHandle, [&]() {
+ // CascadedUnion is the same as UnaryUnion, except that
+ // CascadedUnion only works on MultiPolygon, so we just delegate
+ // now and retain a check on MultiPolygon type.
+ const geos::geom::MultiPolygon *p = dynamic_cast<const geos::geom::MultiPolygon *>(g1);
+ if (!p) {
+ throw IllegalArgumentException("Invalid argument (must be a MultiPolygon)");
+ }
+ return GEOSUnaryUnion_r(extHandle, g1);
+ });
}
Geometry*
diff --git a/tests/unit/geom/LineStringTest.cpp b/tests/unit/geom/LineStringTest.cpp
index 3d03d03..9921887 100644
--- a/tests/unit/geom/LineStringTest.cpp
+++ b/tests/unit/geom/LineStringTest.cpp
@@ -563,8 +563,8 @@ void object::test<31>
try {
// Create non-empty LineString instance
auto lr(factory_->createLinearRing(pseq));
- fail("IllegalArgumentException expected.");
ensure(!lr->isEmpty());
+ fail("IllegalArgumentException expected.");
}
catch(geos::util::IllegalArgumentException const& e) {
const char* msg = e.what(); // OK
-----------------------------------------------------------------------
Summary of changes:
capi/geos_ts_c.cpp | 18 ++++++++++--------
tests/unit/geom/LineStringTest.cpp | 2 +-
2 files changed, 11 insertions(+), 9 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list