X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Frender%2Fobject.cpp;h=8a3963eebe992f9db802184b5f20b9d86b461ab7;hb=3a1b9cbe2441ae670a97541dc8ccb0a2860c8302;hp=067686d205cee62f8b117ce429c75f58c2e1b21a;hpb=d493917dbc215cd6ba3f8773a52a289d9f14380d;p=libs%2Fgl.git diff --git a/source/render/object.cpp b/source/render/object.cpp index 067686d2..8a3963ee 100644 --- a/source/render/object.cpp +++ b/source/render/object.cpp @@ -76,12 +76,12 @@ void Object::set_mesh(unsigned i, const Mesh *m) void Object::update_bounding_sphere() { vector points; - for(vector::const_iterator i=lods.begin(); i!=lods.end(); ++i) + for(const LevelOfDetail &l: lods) { - if(!i->mesh || !i->mesh->is_loaded()) + if(!l.mesh || !l.mesh->is_loaded()) continue; - const VertexArray &vertices = i->mesh->get_vertices(); + const VertexArray &vertices = l.mesh->get_vertices(); int offset = vertices.get_format().offset(VERTEX3); bool three = true;