summaryrefslogtreecommitdiffstats
path: root/src/2geom/basic-intersection.cpp
diff options
context:
space:
mode:
authorroot <root@jtx.marker.es>2013-03-16 20:28:39 +0000
committerroot <root@jtx.marker.es>2013-03-16 20:28:39 +0000
commitdc88806b0778f65a3f16071c9782d607cc735dda (patch)
treeac560318c8a3bb2ac244edba6511082bb06cac34 /src/2geom/basic-intersection.cpp
parentUpdating original path (diff)
parentFix another tonne of forward declaration tags (diff)
downloadinkscape-dc88806b0778f65a3f16071c9782d607cc735dda.tar.gz
inkscape-dc88806b0778f65a3f16071c9782d607cc735dda.zip
widget working not compile
(bzr r11950.1.54)
Diffstat (limited to 'src/2geom/basic-intersection.cpp')
-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;
}