diff options
author | Murray Cumming <murrayc@murrayc.com> | 2016-12-11 19:44:49 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2016-12-11 21:43:41 +0100 |
commit | cb35307fa9e8ccdd4d18a0f508ca8887d740c940 (patch) | |
tree | 5693360a1389ec28883c119e1911aa53a8a35c62 /glib/glibmm | |
parent | d5ae58f95facd84ca77ce46e7dd3aeecc4d2e25e (diff) | |
download | glibmm-cb35307fa9e8ccdd4d18a0f508ca8887d740c940.tar.gz |
Use std::dynamic_pointer_cast<>().
Instead of Glib::RefPtr<>::cast_dynamic().
Diffstat (limited to 'glib/glibmm')
-rw-r--r-- | glib/glibmm/object.h | 4 | ||||
-rw-r--r-- | glib/glibmm/value.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/glib/glibmm/object.h b/glib/glibmm/object.h index 181664e0..cbe2aedb 100644 --- a/glib/glibmm/object.h +++ b/glib/glibmm/object.h @@ -258,7 +258,7 @@ public: static GType value_type() { return T::get_base_type(); } void set(const CppType& data) { set_object(data.get()); } - CppType get() const { return Glib::RefPtr<T>::cast_dynamic(get_object_copy()); } + CppType get() const { return std::dynamic_pointer_cast<T>(get_object_copy()); } }; // The SUN Forte Compiler has a problem with this: @@ -277,7 +277,7 @@ public: static GType value_type() { return T::get_base_type(); } void set(const CppType& data) { set_object(const_cast<T*>(data.get())); } - CppType get() const { return Glib::RefPtr<T>::cast_dynamic(get_object_copy()); } + CppType get() const { return std::dynamic_pointer_cast<T>(get_object_copy()); } }; #endif /* GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS */ diff --git a/glib/glibmm/value.h b/glib/glibmm/value.h index 8f983ceb..f4ef49f4 100644 --- a/glib/glibmm/value.h +++ b/glib/glibmm/value.h @@ -240,7 +240,7 @@ public: static GType value_type() { return T::get_base_type(); } void set(const CppType& data) { set_object(data.get()); } - CppType get() const { return Glib::RefPtr<T>::cast_dynamic(get_object_copy()); } + CppType get() const { return std::dynamic_pointer_cast<T>(get_object_copy()); } }; // The SUN Forte Compiler has a problem with this: @@ -259,7 +259,7 @@ public: static GType value_type() { return T::get_base_type(); } void set(const CppType& data) { set_object(const_cast<T*>(data.get())); } - CppType get() const { return Glib::RefPtr<T>::cast_dynamic(get_object_copy()); } + CppType get() const { return std::dynamic_pointer_cast<T>(get_object_copy()); } }; #endif // GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS |