[glibmm/wip/dboles/property-proxy-const: 1/2] Property: Getting Proxy from ReadOnly is const too



commit bfe785f44dffd7fcd4457f96b7b927092d08ee55
Author: Daniel Boles <dboles src gnome org>
Date:   Tue Jun 11 23:24:30 2019 +0100

    Property: Getting Proxy from ReadOnly is const too
    
    Thereʼs no need for this to require a non-const Property_ReadOnly as the
    Proxy by definition canʼt modify it, so make it const like other methods

 glib/glibmm/property.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/glib/glibmm/property.h b/glib/glibmm/property.h
index 305914c7..86105d83 100644
--- a/glib/glibmm/property.h
+++ b/glib/glibmm/property.h
@@ -273,7 +273,7 @@ public:
 
   /** Returns a proxy object that can be used to read this property.
    */
-  inline Glib::PropertyProxy_ReadOnly<T> get_proxy();
+  inline Glib::PropertyProxy_ReadOnly<T> get_proxy() const;
 };
 
 /** See Property.
@@ -462,7 +462,7 @@ inline Property_ReadOnly<T>::operator T() const
 
 template <class T>
 inline Glib::PropertyProxy_ReadOnly<T>
-Property_ReadOnly<T>::get_proxy()
+Property_ReadOnly<T>::get_proxy() const
 {
   return Glib::PropertyProxy_ReadOnly<T>(object_, get_name_internal());
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]