From 1ab880a7c99a5c396b5247e8e516883da520274c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 5 Jun 2014 00:19:29 +0200 Subject: [PATCH] GCC 4.5 compatibility: no range-based for loops. Strangely enough the first loop affected MSVC 2013 parser as well, it complained about unexpected } (which is inside the assertion). WTF?! --- src/Magnum/MeshView.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Magnum/MeshView.cpp b/src/Magnum/MeshView.cpp index bc5274030..7df1064fb 100644 --- a/src/Magnum/MeshView.cpp +++ b/src/Magnum/MeshView.cpp @@ -44,8 +44,8 @@ void MeshView::draw(AbstractShaderProgram& shader, std::initializer_listget()._original.get(); - for(MeshView& mesh: meshes) - CORRADE_ASSERT(&mesh._original.get() == original, "MeshView::draw(): all meshes must be views of the same original mesh", ); + for(auto it = meshes.begin(); it != meshes.end(); ++it) + CORRADE_ASSERT(&it->get()._original.get() == original, "MeshView::draw(): all meshes must be views of the same original mesh", ); #endif #ifndef MAGNUM_TARGET_GLES @@ -70,7 +70,8 @@ void MeshView::multiDrawImplementationDefault(std::initializer_listget(); CORRADE_ASSERT(mesh._instanceCount == 1, "MeshView::draw(): cannot draw multiple instanced meshes", ); count[i] = mesh._count;