@ -404,6 +404,9 @@ See also:
- Improved @ref TextureTools::distanceField() to work better on shader
compilers that have problems compiling nested loops (WebGL implementations,
some ES2 devices)
- @ref SceneGraph::AbstractObject::addFeature() and
@ref SceneGraph::Object::addChild() were not properly forwarding reference
arguments
@subsection changelog-latest-docs Documentation
@ -111,7 +111,7 @@ template<UnsignedInt dimensions, class T> class AbstractObject
* Calling `object.addFeature<MyFeature>(args...)` is equivalent to
* `new MyFeature{object, args...}`.
*/
template<class U, class ...Args> U& addFeature(Args... args) {
template<class U, class ...Args> U& addFeature(Args&&... args) {
return *(new U{*this, std::forward<Args>(args)...});
}
@ -193,7 +193,7 @@ template<class Transformation> class Object: public AbstractObject<Transformatio
* Calling `object.addChild<MyObject>(args...)` is equivalent to
* `new MyObject{args..., &object}`.
template<class T, class ...Args> T& addChild(Args... args) {
template<class T, class ...Args> T& addChild(Args&&... args) {
return *(new T{std::forward<Args>(args)..., this});