diff --git a/include/osg/observer_ptr b/include/osg/observer_ptr index b19a4694a..6a07ad834 100644 --- a/include/osg/observer_ptr +++ b/include/osg/observer_ptr @@ -14,6 +14,8 @@ #ifndef OSG_OBSERVER_PTR #define OSG_OBSERVER_PTR +#include + namespace osg { class Observer @@ -57,12 +59,9 @@ class observer_ptr : public Observer return *this; } - virtual void objectDeleted(void* ptr) + virtual void objectDeleted(void*) { - if (_ptr==ptr) - { - _ptr = 0; - } + _ptr = 0; } // comparison operators for observer_ptr.