Browse Source

GCC 4.5 compatibility: no range-based for.

Vladimír Vondruš 14 years ago
parent
commit
f1d00360ff
  1. 6
      src/Physics/Implementation/DebugRenderer.h

6
src/Physics/Implementation/DebugRenderer.h

@ -37,7 +37,8 @@ template<std::uint8_t dimensions> class DebugRenderer: public SceneGraph::Drawab
DebugRenderer(SceneGraph::AbstractObject<dimensions>* object, Resource<Options>&& options): SceneGraph::Drawable<dimensions>(object), options(options) {} DebugRenderer(SceneGraph::AbstractObject<dimensions>* object, Resource<Options>&& options): SceneGraph::Drawable<dimensions>(object), options(options) {}
inline ~DebugRenderer() { inline ~DebugRenderer() {
for(auto i: renderers) delete i; for(auto it = renderers.begin(); it != renderers.end(); ++it)
delete *it;
} }
inline void addRenderer(AbstractDebugRenderer<dimensions>* renderer) { inline void addRenderer(AbstractDebugRenderer<dimensions>* renderer) {
@ -45,7 +46,8 @@ template<std::uint8_t dimensions> class DebugRenderer: public SceneGraph::Drawab
} }
inline void draw(const typename DimensionTraits<dimensions>::MatrixType& transformationMatrix, SceneGraph::AbstractCamera<dimensions, GLfloat>* camera) override { inline void draw(const typename DimensionTraits<dimensions>::MatrixType& transformationMatrix, SceneGraph::AbstractCamera<dimensions, GLfloat>* 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: private:

Loading…
Cancel
Save