diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-09 03:53:05 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-09 03:53:05 (GMT) |
commit | cbba974d3ac1edeb716a1384a2262ed5447fa9e6 (patch) | |
tree | 30708ef085204435d644c4ab685b87556628d22a /src/primitives.cc | |
parent | 328897c1f28e0d438aa678891f8d5a45b114f267 (diff) |
Initial attempt of cleaning up polyset handling. PolySet no longer keeps a refcount, basic cache mechanism is in place, instantiating polysets are controlled through PolySetEvaluator
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)); |