[geos-commits] [SCM] GEOS branch 3.8 updated. 17110ec835b9f1f61d45fce37c00f574e640e195
git at osgeo.org
git at osgeo.org
Mon Mar 9 18:25:56 PDT 2020
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, 3.8 has been updated
via 17110ec835b9f1f61d45fce37c00f574e640e195 (commit)
via 7af76085fcfa21f88d6508eb9b2ef523850f0dd0 (commit)
via f3fd71cf00f0407aa24710458c9677f7637caa61 (commit)
from 07ad79c5ad48095aa2822668a2bc15085875eb52 (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 17110ec835b9f1f61d45fce37c00f574e640e195
Author: Dan Baston <dbaston at gmail.com>
Date: Mon Mar 2 13:27:07 2020 -0500
NEWS update
diff --git a/NEWS b/NEWS
index b634f11..f5aa0b0 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,5 @@
Changes in 3.8.1
-2019-xx-xx
+2020-xx-xx
- Bug fixes / improvements
- Stack allocate line segments in OverlapUnion (Paul Ramsey)
@@ -10,6 +10,8 @@ Changes in 3.8.1
- Improve performance of GEOSisValid (#1008, Dan Baston)
- Avoid changing MultiLineString component order in GEOSReverse
(#1013, Dan Baston)
+ - Fix missing vtable for LineString and CoordinateArraySequenceFactory
+ (#299 and #1016, Evgen Bodunov)
Changes in 3.8.0
2019-10-10
commit 7af76085fcfa21f88d6508eb9b2ef523850f0dd0
Author: Dan Baston <dbaston at gmail.com>
Date: Mon Mar 2 13:20:28 2020 -0500
Add test showing LineString vtable creation
References https://github.com/libgeos/geos/issues/285
References #1016
diff --git a/tests/unit/geom/LineStringTest.cpp b/tests/unit/geom/LineStringTest.cpp
index 2adffdb..6873371 100644
--- a/tests/unit/geom/LineStringTest.cpp
+++ b/tests/unit/geom/LineStringTest.cpp
@@ -512,5 +512,20 @@ void object::test<28>
ensure(geo->isDimensionStrict(geos::geom::Dimension::L));
ensure(!geo->isDimensionStrict(geos::geom::Dimension::A));
}
+
+// test dynamic_cast for LineString (shows that vtable is created)
+// https://github.com/libgeos/geos/issues/285
+template<>
+template<>
+void object::test<29>
+()
+{
+ std::unique_ptr<geos::geom::LineString> a = geos::geom::GeometryFactory::getDefaultInstance()->createLineString();
+ geos::geom::Geometry *b = a.get(); // ok
+ geos::geom::LineString *c = dynamic_cast<geos::geom::LineString *>(b);
+
+ ensure(c != nullptr);
+}
+
} // namespace tut
commit f3fd71cf00f0407aa24710458c9677f7637caa61
Author: Evgen Bodunov <evgen at getyourmap.com>
Date: Thu Feb 27 17:59:40 2020 +0300
Fixed https://trac.osgeo.org/geos/ticket/894 and https://github.com/libgeos/geos/issues/285
To have a vtable we should have explicit definition of key function. Details: https://lld.llvm.org/missingkeyfunction.html#missing-key-function
diff --git a/include/geos/geom/CoordinateArraySequenceFactory.inl b/include/geos/geom/CoordinateArraySequenceFactory.inl
index 761fdc6..e36a313 100644
--- a/include/geos/geom/CoordinateArraySequenceFactory.inl
+++ b/include/geos/geom/CoordinateArraySequenceFactory.inl
@@ -23,14 +23,6 @@ namespace geos {
namespace geom { // geos::geom
INLINE std::unique_ptr<CoordinateSequence>
-CoordinateArraySequenceFactory::create() const
-{
- return std::unique_ptr<CoordinateSequence>(
- new CoordinateArraySequence(
- reinterpret_cast<std::vector<Coordinate>*>(0), 0));
-}
-
-INLINE std::unique_ptr<CoordinateSequence>
CoordinateArraySequenceFactory::create(std::vector<Coordinate>* coords,
size_t dimension) const
{
diff --git a/include/geos/geom/LineString.h b/include/geos/geom/LineString.h
index 6ed0348..0316d62 100644
--- a/include/geos/geom/LineString.h
+++ b/include/geos/geom/LineString.h
@@ -74,7 +74,7 @@ public:
/// A vector of const LineString pointers
typedef std::vector<const LineString*> ConstVect;
- ~LineString() override = default;
+ ~LineString() override;
/**
* \brief
diff --git a/src/geom/CoordinateArraySequenceFactory.cpp b/src/geom/CoordinateArraySequenceFactory.cpp
index decd6bd..ab0a6e8 100644
--- a/src/geom/CoordinateArraySequenceFactory.cpp
+++ b/src/geom/CoordinateArraySequenceFactory.cpp
@@ -25,6 +25,14 @@ namespace geom { // geos::geom
static CoordinateArraySequenceFactory defaultCoordinateSequenceFactory;
+std::unique_ptr<CoordinateSequence>
+CoordinateArraySequenceFactory::create() const
+{
+ return std::unique_ptr<CoordinateSequence>(
+ new CoordinateArraySequence(
+ reinterpret_cast<std::vector<Coordinate>*>(0), 0));
+}
+
const CoordinateSequenceFactory*
CoordinateArraySequenceFactory::instance()
{
diff --git a/src/geom/LineString.cpp b/src/geom/LineString.cpp
index cfcbb2b..65f86a0 100644
--- a/src/geom/LineString.cpp
+++ b/src/geom/LineString.cpp
@@ -45,6 +45,8 @@ using namespace geos::algorithm;
namespace geos {
namespace geom { // geos::geom
+LineString::~LineString(){};
+
/*protected*/
LineString::LineString(const LineString& ls)
:
diff --git a/tests/unit/geom/CoordinateArraySequenceFactoryTest.cpp b/tests/unit/geom/CoordinateArraySequenceFactoryTest.cpp
index caea683..a69413c 100644
--- a/tests/unit/geom/CoordinateArraySequenceFactoryTest.cpp
+++ b/tests/unit/geom/CoordinateArraySequenceFactoryTest.cpp
@@ -52,10 +52,8 @@ void object::test<1>
ensure(nullptr != derived);
ensure(typeid(derived).name(), typeid(derived) == typeid(CoordinateArrayFactoryCPtr));
}
- catch(std::exception& /* e */) {
- /** ignore failure. TODO figure out why this fails on BSD/Clang
- * https://trac.osgeo.org/geos/ticket/894 and then put back**/
- //fail( e.what() );
+ catch(std::exception& e) {
+ fail( e.what() );
}
}
-----------------------------------------------------------------------
Summary of changes:
NEWS | 4 +++-
include/geos/geom/CoordinateArraySequenceFactory.inl | 8 --------
include/geos/geom/LineString.h | 2 +-
src/geom/CoordinateArraySequenceFactory.cpp | 8 ++++++++
src/geom/LineString.cpp | 2 ++
tests/unit/geom/CoordinateArraySequenceFactoryTest.cpp | 6 ++----
tests/unit/geom/LineStringTest.cpp | 15 +++++++++++++++
7 files changed, 31 insertions(+), 14 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list