diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-11 05:37:14 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-11 05:37:14 (GMT) |
commit | 9afeded46c0e9023002dc04ba6131adcb39762b1 (patch) | |
tree | 0096a12ce36a5b39aa18d7ec5da45c05eb3d42dd /src/primitives.cc | |
parent | b087e68e5430c3dde6adfe452becbaba0f680196 (diff) | |
parent | dc7eeb30d06a928a30ee47a765be3e5a61288d35 (diff) |
Merge branch 'polyset-cleanup' into visitor
Diffstat (limited to 'src/primitives.cc')
-rw-r--r-- | src/primitives.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/primitives.cc b/src/primitives.cc index 50a197d..08b9c62 100644 --- a/src/primitives.cc +++ b/src/primitives.cc @@ -102,7 +102,7 @@ public: primitive_type_e type; int convexity; Value points, paths, triangles; - virtual PolySet *evaluate_polyset(render_mode_e mode, class PolySetEvaluator *) const; + virtual PolySet *evaluate_polyset(class PolySetEvaluator *) const; }; AbstractNode *PrimitiveModule::evaluate(const Context *ctx, const ModuleInstantiation *inst) const @@ -273,7 +273,7 @@ static void generate_circle(point2d *circle, double r, int fragments) } } -PolySet *PrimitiveNode::evaluate_polyset(render_mode_e, class PolySetEvaluator *) const +PolySet *PrimitiveNode::evaluate_polyset(class PolySetEvaluator *) const { PolySet *p = new PolySet(); @@ -518,7 +518,7 @@ sphere_next_r2: double x,y; if (!this->points.vec[i]->getv2(x, y)) { PRINTF("ERROR: Unable to convert point at index %d to a vec2 of numbers", i); - p->unlink(); + delete p; return NULL; } dd.points.push_back(Vector2d(x, y)); |