[geos-commits] [SCM] geos branch master updated. 5d3e5a1c0e525b72481fdddec35f2929e8e4d665
git at osgeo.org
git at osgeo.org
Thu Sep 7 02:11:41 PDT 2017
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 5d3e5a1c0e525b72481fdddec35f2929e8e4d665 (commit)
via 441dc93f8cd23dcdf204143d524e426f4ccb8bc3 (commit)
from f0a3f0002f5dd3c8308c21d95aa1eb4008cb06d6 (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 5d3e5a1c0e525b72481fdddec35f2929e8e4d665
Merge: f0a3f00 441dc93
Author: Sandro Santilli <strk at kbt.io>
Date: Thu Sep 7 02:11:41 2017 -0700
Merge branch 'ml/remove-GeometryList' of mloskot/geos into master
commit 441dc93f8cd23dcdf204143d524e426f4ccb8bc3
Author: Mateusz Loskot <mateusz at loskot.net>
Date: Thu Sep 7 10:25:58 2017 +0200
Remove GeometryList class
It is completely unused in GEOS and becomes deprecated in C++11.
Use std::vector<Geometry::Ptr> instead.
Part of GEOS RFC 5: C++11 Compilation Mode
diff --git a/include/geos/geom/GeometryList.h b/include/geos/geom/GeometryList.h
deleted file mode 100644
index ca1502d..0000000
--- a/include/geos/geom/GeometryList.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/**********************************************************************
- *
- * GEOS - Geometry Engine Open Source
- * http://geos.osgeo.org
- *
- * Copyright (C) 2006 Refractions Research Inc.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation.
- * See the COPYING file for more information.
- *
- **********************************************************************
- *
- * Last port: ORIGINAL WORK
- *
- **********************************************************************/
-
-#ifndef GEOS_GEOM_GEOMETRYLIST_H
-#define GEOS_GEOM_GEOMETRYLIST_H
-
-#include <geos/export.h>
-#include <geos/geom/Geometry.h> // for auto_ptr
-
-#include <memory> // for auto_ptr
-#include <vector>
-
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class
-#endif
-
-namespace geos {
-namespace geom { // geos.geom
-
-
-/** \brief
- * Manager of Geometry pointers. Owns the Geometries.
- */
-class GEOS_DLL GeometryList {
-
-public:
-
- /// auto_ptr needs to access private destructor
- friend class std::auto_ptr<GeometryList>;
-
- typedef std::vector<Geometry*>::size_type size_type;
-
- /// Only way to manage a GeometryList is trough
- /// this an auto_ptr<>. @see create()
- typedef std::auto_ptr<GeometryList> AutoPtr;
-
- /// Create an empty GeometryList
- static GeometryList::AutoPtr create();
-
- /// Add a geometry to the list (takes ownership)
- void add(Geometry::AutoPtr geom);
-
- /// Return number of geometries in this list
- size_type size() const;
-
- /// Returned object lifetime is bound to GeometryList lifetime
- Geometry* operator[] (size_type);
-
- /// Returned object lifetime is bound to GeometryList lifetime
- const Geometry* operator[] (size_type) const;
-
-private:
-
- std::vector<Geometry*> geoms;
-
- GeometryList();
- ~GeometryList();
-};
-
-} // namespace geos.geom
-} // namespace geos
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#endif // GEOS_GEOM_GEOMETRYLIST_H
diff --git a/src/geom/GeometryList.cpp b/src/geom/GeometryList.cpp
deleted file mode 100644
index b24f29c..0000000
--- a/src/geom/GeometryList.cpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/**********************************************************************
- *
- * GEOS - Geometry Engine Open Source
- * http://geos.osgeo.org
- *
- * Copyright (C) 2006 Refractions Research Inc.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation.
- * See the COPYING file for more information.
- *
- **********************************************************************
- *
- * Last port: ORIGINAL WORK
- *
- **********************************************************************/
-
-#include <geos/geom/GeometryList.h>
-#include <geos/geom/Geometry.h> // for auto_ptr
-
-#include <memory> // for auto_ptr
-#include <vector>
-
-namespace geos {
-namespace geom { // geos.geom
-
-
-/*private*/
-GeometryList::GeometryList()
-{
-}
-
-/*private*/
-GeometryList::~GeometryList()
-{
- for (std::vector<Geometry*>::size_type i=0, n=geoms.size(); i<n; i++)
- {
- delete geoms[i];
- }
-}
-
-/*public static*/
-GeometryList::AutoPtr
-GeometryList::create()
-{
- return GeometryList::AutoPtr(new GeometryList());
-}
-
-/*public*/
-void
-GeometryList::add(Geometry::AutoPtr geom)
-{
- geoms.push_back(geom.release());
-}
-
-/*public*/
-GeometryList::size_type
-GeometryList::size() const
-{
- return geoms.size();
-}
-
-/*public*/
-Geometry *
-GeometryList::operator[] (GeometryList::size_type i)
-{
- return geoms[i];
-}
-
-/*public*/
-const Geometry *
-GeometryList::operator[] (GeometryList::size_type i) const
-{
- return geoms[i];
-}
-
-
-} // namespace geos.geom
-} // namespace geos
-----------------------------------------------------------------------
Summary of changes:
include/geos/geom/GeometryList.h | 83 --------------------------------------
src/geom/GeometryList.cpp | 80 ------------------------------------
2 files changed, 163 deletions(-)
delete mode 100644 include/geos/geom/GeometryList.h
delete mode 100644 src/geom/GeometryList.cpp
hooks/post-receive
--
geos
More information about the geos-commits
mailing list