[geos-commits] [SCM] GEOS branch svn-3.6 updated. dfea6aaac4af05800e1806fb99292ca943ac2d5a
git at osgeo.org
git at osgeo.org
Fri Sep 13 11:05:48 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, svn-3.6 has been updated
via dfea6aaac4af05800e1806fb99292ca943ac2d5a (commit)
from 9168be973f89b128bece2c2713929e77e244f79b (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 dfea6aaac4af05800e1806fb99292ca943ac2d5a
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date: Fri Sep 13 11:05:24 2019 -0700
Change from std::array to int[]
References #986
diff --git a/include/geos/geomgraph/TopologyLocation.h b/include/geos/geomgraph/TopologyLocation.h
index f0b5f8d..874357c 100644
--- a/include/geos/geomgraph/TopologyLocation.h
+++ b/include/geos/geomgraph/TopologyLocation.h
@@ -8,7 +8,7 @@
*
* 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.
+ * by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
@@ -25,7 +25,6 @@
#include <geos/inline.h>
#include <vector>
-#include <array>
#include <string>
#ifdef _MSC_VER
@@ -39,14 +38,14 @@ namespace geomgraph { // geos.geomgraph
/** \brief
* A TopologyLocation is the labelling of a
* GraphComponent's topological relationship to a single Geometry.
- *
+ *
* If the parent component is an area edge, each side and the edge itself
* have a topological location. These locations are named
- *
+ *
* - ON: on the edge
* - LEFT: left-hand side of the edge
* - RIGHT: right-hand side
- *
+ *
* If the parent component is a line edge or node, there is a single
* topological relationship attribute, ON.
*
@@ -72,7 +71,7 @@ public:
* Geometry.
*
* Possible values for the
- * parameters are Location::UNDEF, Location::EXTERIOR, Location::BOUNDARY,
+ * parameters are Location::UNDEF, Location::EXTERIOR, Location::BOUNDARY,
* and Location::INTERIOR.
*
* @see Location
@@ -114,7 +113,7 @@ public:
void setLocation(int locValue);
/// Warning: returns reference to owned memory
- const std::array<int, 3>& getLocations() const;
+ const int* getLocations() const;
void setLocations(int on, int left, int right);
@@ -130,7 +129,7 @@ public:
private:
- std::array<int, 3> location;
+ int location[3];
std::size_t locationSize;
};
diff --git a/src/geomgraph/TopologyLocation.cpp b/src/geomgraph/TopologyLocation.cpp
index 873ccb2..b5bd303 100644
--- a/src/geomgraph/TopologyLocation.cpp
+++ b/src/geomgraph/TopologyLocation.cpp
@@ -8,7 +8,7 @@
*
* 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.
+ * by the Free Software Foundation.
* See the COPYING file for more information.
*
**********************************************************************
@@ -55,24 +55,26 @@ TopologyLocation::TopologyLocation(int on, int left, int right):
TopologyLocation::TopologyLocation(int on):
locationSize(1)
{
- location.fill(Location::UNDEF);
location[Position::ON] = on;
}
/*public*/
-TopologyLocation::TopologyLocation(const TopologyLocation &gl)
- :
- location(gl.location),
- locationSize(gl.locationSize)
+TopologyLocation::TopologyLocation(const TopologyLocation &gl):
+ locationSize(gl.locationSize)
{
+ for (size_t i=0; i<locationSize; ++i) {
+ location[i] = gl.location[i];
+ }
}
/*public*/
TopologyLocation&
TopologyLocation::operator= (const TopologyLocation &gl)
{
- location = gl.location;
locationSize = gl.locationSize;
+ for (size_t i=0; i<locationSize; ++i) {
+ location[i] = gl.location[i];
+ }
return *this;
}
@@ -140,7 +142,9 @@ TopologyLocation::flip()
void
TopologyLocation::setAllLocations(int locValue)
{
- location.fill(locValue);
+ for (size_t i=0; i<locationSize; ++i) {
+ location[i]=locValue;
+ }
}
/*public*/
@@ -167,7 +171,7 @@ TopologyLocation::setLocation(int locValue)
}
/*public*/
-const std::array<int, 3>&
+const int*
TopologyLocation::getLocations() const
{
return location;
-----------------------------------------------------------------------
Summary of changes:
include/geos/geomgraph/TopologyLocation.h | 15 +++++++--------
src/geomgraph/TopologyLocation.cpp | 22 +++++++++++++---------
2 files changed, 20 insertions(+), 17 deletions(-)
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list