diff --git a/src/Object.cpp b/src/Object.cpp index a61097538..55d778e77 100644 --- a/src/Object.cpp +++ b/src/Object.cpp @@ -79,7 +79,7 @@ Object::~Object() { delete *_children.begin(); } -Scene* Object::scene() const { +Scene* Object::scene() { /* Goes up the family tree until it finds object which is parent of itself (that's the scene) */ Object* p = parent(); diff --git a/src/Object.h b/src/Object.h index 257b430f6..cd0302254 100644 --- a/src/Object.h +++ b/src/Object.h @@ -65,13 +65,13 @@ class MAGNUM_EXPORT Object { * @brief %Scene * @return If the object is not assigned to any scene, returns nullptr. */ - Scene* scene() const; + Scene* scene(); /** @brief Parent object */ - inline Object* parent() const { return _parent; } + inline Object* parent() { return _parent; } /** @brief Child objects */ - inline const std::set& children() const { return _children; } + inline const std::set& children() { return _children; } /** @brief Set parent object */ void setParent(Object* parent);