diff --git a/src/App/DocumentObserver.h b/src/App/DocumentObserver.h index 514bdf8387..c1070d6894 100644 --- a/src/App/DocumentObserver.h +++ b/src/App/DocumentObserver.h @@ -377,9 +377,9 @@ public: } /*! * \brief operator -> - * \return pointer to the document + * \return pointer to the document object */ - T* operator->() { + T* operator->() const { return ptr.get(); } /*! diff --git a/src/Gui/DocumentObserver.h b/src/Gui/DocumentObserver.h index 4c550ac620..c923185cd3 100644 --- a/src/Gui/DocumentObserver.h +++ b/src/Gui/DocumentObserver.h @@ -255,9 +255,9 @@ public: } /*! * \brief operator -> - * \return pointer to the document + * \return pointer to the view provider */ - T* operator->() { + T* operator->() const { return ptr.get(); } /*!