diff --git a/src/Math/Functions.h b/src/Math/Functions.h index 06477f181..c05f41087 100644 --- a/src/Math/Functions.h +++ b/src/Math/Functions.h @@ -289,7 +289,12 @@ Computes and returns @f$ ab + c @f$. template inline T fma(const T& a, const T& b, const T& c); #else template inline typename std::enable_if::value, T>::type fma(T a, T b, T c) { + /** @todo Remove when NaCl's newlib has this fixed */ + #ifndef CORRADE_TARGET_NACL_NEWLIB return std::fma(a, b, c); + #else + return a*b + c; + #endif } template inline Vector fma(const Vector& a, const Vector& b, const Vector& c) { return a*b + c; diff --git a/src/Physics/Test/CapsuleTest.cpp b/src/Physics/Test/CapsuleTest.cpp index 9e69302fe..9c829f7e8 100644 --- a/src/Physics/Test/CapsuleTest.cpp +++ b/src/Physics/Test/CapsuleTest.cpp @@ -52,7 +52,6 @@ void CapsuleTest::applyTransformation() { CORRADE_COMPARE(capsule.transformedA(), Vector3(-2.0f, 1.0f, 3.0f)); CORRADE_COMPARE(capsule.transformedB(), Vector3(2.0f, -1.0f, -3.0f)); CORRADE_COMPARE(capsule.transformedRadius(), 7.0f); -} /* Apply average scaling to radius */ capsule.applyTransformationMatrix(Matrix4::scaling({Constants::sqrt3(), -Constants::sqrt2(), 2.0f})); diff --git a/src/SceneGraph/Object.hpp b/src/SceneGraph/Object.hpp index 59516ab9b..87c93e520 100644 --- a/src/SceneGraph/Object.hpp +++ b/src/SceneGraph/Object.hpp @@ -347,7 +347,9 @@ template void Object::setClean(std::vector /* Go through all objects and clean them */ for(std::size_t i = 0; i != objects.size(); ++i) { - CORRADE_INTERNAL_ASSERT(objects[i]->isDirty()); + /* The object might be duplicated in the list, don't clean it more than once */ + if(!objects[i]->isDirty()) continue; + objects[i]->setClean(transformations[i]); CORRADE_ASSERT(!objects[i]->isDirty(), "SceneGraph::Object::setClean(): original implementation was not called", ); }