Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/primitives.cc')
-rw-r--r--src/model/primitives.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/model/primitives.cc b/src/model/primitives.cc
index 85b07ee..e58bd14 100644
--- a/src/model/primitives.cc
+++ b/src/model/primitives.cc
@@ -17,13 +17,15 @@ Primitives::Primitives(Material *material)
Primitives::~Primitives()
{
// clear list of triangles
- for (std::list<Triangle *>::iterator tris_it = primitives_triangles.begin(); tris_it != primitives_triangles.end(); tris_it++)
+ for (std::list<Triangle *>::iterator tris_it = primitives_triangles.begin(); tris_it != primitives_triangles.end(); ++tris_it) {
delete(*tris_it);
+ }
primitives_triangles.clear();
// clear list of quads
- for (std::list<Quad *>::iterator quad_it = primitives_quads.begin(); quad_it != primitives_quads.end(); quad_it++)
+ for (std::list<Quad *>::iterator quad_it = primitives_quads.begin(); quad_it != primitives_quads.end(); ++quad_it) {
delete(*quad_it);
+ }
primitives_quads.clear();
}
@@ -37,4 +39,5 @@ void Primitives::add_quad(Quad *quad)
primitives_quads.push_back(quad);
}
-}
+} // namespace model
+