From fa55d91d2f96eb641b109ec863af3e2fabf275bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 5 Jul 2012 23:02:59 +0200 Subject: [PATCH] GCC 4.4 compatibility: lambda functions aren't supported yet. --- src/Primitives/Icosphere.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Primitives/Icosphere.h b/src/Primitives/Icosphere.h index 7ce808846..e81bf8c78 100644 --- a/src/Primitives/Icosphere.h +++ b/src/Primitives/Icosphere.h @@ -52,13 +52,17 @@ template class Icosphere { /** @brief Constructor */ Icosphere() { for(size_t i = 0; i != subdivisions; ++i) - MeshTools::subdivide(*indices(), *normals(0), [](const Vector3& a, const Vector3& b) { - return (a+b).normalized(); - }); + MeshTools::subdivide(*indices(), *normals(0), interpolator); MeshTools::clean(*indices(), *normals(0)); vertices(0)->assign(normals(0)->begin(), normals(0)->end()); } + + #ifndef DOXYGEN_GENERATING_OUTPUT + static Vector3 interpolator(const Vector3& a, const Vector3& b) { + return (a+b).normalized(); + } + #endif }; }}