summaryrefslogtreecommitdiffstats
path: root/src/2geom/basic-intersection.cpp
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-03-29 23:52:42 +0000
committerMarkus Engel <markus.engel@tum.de>2013-03-29 23:52:42 +0000
commita168040d5a452544328a1e6ad35aaac351f94d44 (patch)
treefae1ba829f543a473da281bd5fa6e4deabbf6912 /src/2geom/basic-intersection.cpp
parentRemoved function pointers from SPObject and subclasses. (diff)
parentDutch translation update (diff)
downloadinkscape-a168040d5a452544328a1e6ad35aaac351f94d44.tar.gz
inkscape-a168040d5a452544328a1e6ad35aaac351f94d44.zip
merged from trunk
(bzr r11608.1.56)
Diffstat (limited to '')
-rw-r--r--src/2geom/basic-intersection.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/2geom/basic-intersection.cpp b/src/2geom/basic-intersection.cpp
index 3be6792b9..544bf0dd1 100644
--- a/src/2geom/basic-intersection.cpp
+++ b/src/2geom/basic-intersection.cpp
@@ -64,7 +64,12 @@ void find_intersections(std::vector< std::pair<double, double> > & xs,
void split(vector<Point> const &p, double t,
vector<Point> &left, vector<Point> &right) {
const unsigned sz = p.size();
- Geom::Point Vtemp[sz][sz];
+
+ Geom::Point **Vtemp = new Geom::Point* [sz];
+
+ for (unsigned int i = 0; i < sz; ++i) {
+ Vtemp[i] = new Geom::Point[sz];
+ }
/* Copy control points */
std::copy(p.begin(), p.end(), Vtemp[0]);
@@ -82,6 +87,11 @@ void split(vector<Point> const &p, double t,
left[j] = Vtemp[j][0];
for (unsigned j = 0; j < sz; j++)
right[j] = Vtemp[sz-1-j][j];
+
+ for (unsigned int i = 0; i < sz; ++i)
+ delete[] Vtemp[i];
+
+ delete[] Vtemp;
}