[geos-commits] [SCM] GEOS branch master updated. ee32879243b320fab802d44f30f96ea90f00bcb2

git at osgeo.org git at osgeo.org
Tue Sep 17 18:57:25 PDT 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  ee32879243b320fab802d44f30f96ea90f00bcb2 (commit)
      from  2cc400bb642970bab1f817b184d3dfd295471bbc (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 ee32879243b320fab802d44f30f96ea90f00bcb2
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Sep 17 21:56:16 2019 -0400

    Use empty geometry constructors in WKTReader

diff --git a/src/io/WKTReader.cpp b/src/io/WKTReader.cpp
index fcff5be..d04c925 100644
--- a/src/io/WKTReader.cpp
+++ b/src/io/WKTReader.cpp
@@ -252,7 +252,7 @@ WKTReader::readPointText(StringTokenizer* tokenizer)
     size_t dim;
     string nextToken = getNextEmptyOrOpener(tokenizer);
     if(nextToken == "EMPTY") {
-        return std::unique_ptr<Point>(geometryFactory->createPoint(Coordinate::getNull()));
+        return geometryFactory->createPoint();
     }
 
     Coordinate coord;
@@ -281,7 +281,7 @@ WKTReader::readMultiPointText(StringTokenizer* tokenizer)
 {
     string nextToken = getNextEmptyOrOpener(tokenizer);
     if(nextToken == "EMPTY") {
-        return std::unique_ptr<MultiPoint>(geometryFactory->createMultiPoint());
+        return geometryFactory->createMultiPoint();
     }
 
     int tok = tokenizer->peekNextToken();
@@ -352,7 +352,7 @@ WKTReader::readPolygonText(StringTokenizer* tokenizer)
 {
     string nextToken = getNextEmptyOrOpener(tokenizer);
     if(nextToken == "EMPTY") {
-        return std::unique_ptr<Polygon>(geometryFactory->createPolygon());
+        return geometryFactory->createPolygon();
     }
 
     std::vector<std::unique_ptr<LinearRing>> holes;
@@ -371,7 +371,7 @@ WKTReader::readMultiLineStringText(StringTokenizer* tokenizer)
 {
     string nextToken = getNextEmptyOrOpener(tokenizer);
     if(nextToken == "EMPTY") {
-        return std::unique_ptr<MultiLineString>(geometryFactory->createMultiLineString(nullptr));
+        return geometryFactory->createMultiLineString();
     }
 
     std::vector<std::unique_ptr<LineString>> lineStrings;
@@ -388,7 +388,7 @@ WKTReader::readMultiPolygonText(StringTokenizer* tokenizer)
 {
     string nextToken = getNextEmptyOrOpener(tokenizer);
     if(nextToken == "EMPTY") {
-        return std::unique_ptr<MultiPolygon>(geometryFactory->createMultiPolygon(nullptr));
+        return geometryFactory->createMultiPolygon();
     }
 
     std::vector<std::unique_ptr<Polygon>> polygons;
@@ -405,7 +405,7 @@ WKTReader::readGeometryCollectionText(StringTokenizer* tokenizer)
 {
     string nextToken = getNextEmptyOrOpener(tokenizer);
     if(nextToken == "EMPTY") {
-        return std::unique_ptr<GeometryCollection>(geometryFactory->createGeometryCollection(nullptr));
+        return geometryFactory->createGeometryCollection();
     }
 
     std::vector<std::unique_ptr<Geometry>> geoms;

-----------------------------------------------------------------------

Summary of changes:
 src/io/WKTReader.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list