From f1d00360ff5b6c19b9dff3c7722c32a0162288ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 15 Nov 2012 15:45:34 +0100 Subject: [PATCH] GCC 4.5 compatibility: no range-based for. --- src/Physics/Implementation/DebugRenderer.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Physics/Implementation/DebugRenderer.h b/src/Physics/Implementation/DebugRenderer.h index fdb19e268..ccc2d4192 100644 --- a/src/Physics/Implementation/DebugRenderer.h +++ b/src/Physics/Implementation/DebugRenderer.h @@ -37,7 +37,8 @@ template class DebugRenderer: public SceneGraph::Drawab DebugRenderer(SceneGraph::AbstractObject* object, Resource&& options): SceneGraph::Drawable(object), options(options) {} inline ~DebugRenderer() { - for(auto i: renderers) delete i; + for(auto it = renderers.begin(); it != renderers.end(); ++it) + delete *it; } inline void addRenderer(AbstractDebugRenderer* renderer) { @@ -45,7 +46,8 @@ template class DebugRenderer: public SceneGraph::Drawab } inline void draw(const typename DimensionTraits::MatrixType& transformationMatrix, SceneGraph::AbstractCamera* camera) override { - for(auto i: renderers) i->draw(options, transformationMatrix, camera); + for(auto it = renderers.begin(); it != renderers.end(); ++it) + (*it)->draw(options, transformationMatrix, camera); } private: