diff options
author | Murray Cumming <murrayc@murrayc.com> | 2015-11-19 11:42:26 +0100 |
---|---|---|
committer | Murray Cumming <murrayc@murrayc.com> | 2015-11-19 11:57:26 +0100 |
commit | 52940373276a2cbaae7c2e536e75aff5326b3a3e (patch) | |
tree | 90134edc3ceb5d534f6440d7ed5e0efafc565349 /glib/glibmm/wrap.h | |
parent | 1755af6e6dc62157737c18e3ed8f5beb4b06e25a (diff) | |
download | glibmm-52940373276a2cbaae7c2e536e75aff5326b3a3e.tar.gz |
Use nullptr instead of 0.
Diffstat (limited to 'glib/glibmm/wrap.h')
-rw-r--r-- | glib/glibmm/wrap.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/glib/glibmm/wrap.h b/glib/glibmm/wrap.h index f898785a..9b7d141b 100644 --- a/glib/glibmm/wrap.h +++ b/glib/glibmm/wrap.h @@ -57,7 +57,7 @@ template<class TInterface> TInterface* wrap_auto_interface(GObject* object, bool take_copy = false) { if(!object) - return 0; + return nullptr; // Look up current C++ wrapper instance: ObjectBase* pCppObject = ObjectBase::_get_current_wrapper(object); @@ -110,7 +110,7 @@ Glib::RefPtr<Glib::Object> wrap(GObject* object, bool take_copy = false); template <class T> inline typename T::BaseObjectType* unwrap(T* ptr) { - return (ptr) ? ptr->gobj() : 0; + return (ptr) ? ptr->gobj() : nullptr; } /** Get the underlying C instance from the C++ instance. This is just @@ -119,7 +119,7 @@ typename T::BaseObjectType* unwrap(T* ptr) template <class T> inline const typename T::BaseObjectType* unwrap(const T* ptr) { - return (ptr) ? ptr->gobj() : 0; + return (ptr) ? ptr->gobj() : nullptr; } /** Get the underlying C instance from the C++ instance. This is just @@ -128,7 +128,7 @@ const typename T::BaseObjectType* unwrap(const T* ptr) template <class T> inline typename T::BaseObjectType* unwrap(const Glib::RefPtr<T>& ptr) { - return (ptr) ? ptr->gobj() : 0; + return (ptr) ? ptr->gobj() : nullptr; } /** Get the underlying C instance from the C++ instance. This is just @@ -137,7 +137,7 @@ typename T::BaseObjectType* unwrap(const Glib::RefPtr<T>& ptr) template <class T> inline const typename T::BaseObjectType* unwrap(const Glib::RefPtr<const T>& ptr) { - return (ptr) ? ptr->gobj() : 0; + return (ptr) ? ptr->gobj() : nullptr; } // This unwrap_copy() overload is intended primarily for classes wrapped as @@ -151,7 +151,7 @@ const typename T::BaseObjectType* unwrap(const Glib::RefPtr<const T>& ptr) template <class T> inline typename T::BaseObjectType* unwrap_copy(const T& obj) { - return obj.gobj() ? obj.gobj_copy() : 0; + return obj.gobj() ? obj.gobj_copy() : nullptr; } /** Get the underlying C instance from the C++ instance and acquire a @@ -161,7 +161,7 @@ typename T::BaseObjectType* unwrap_copy(const T& obj) template <class T> inline typename T::BaseObjectType* unwrap_copy(const Glib::RefPtr<T>& ptr) { - return (ptr) ? ptr->gobj_copy() : 0; + return (ptr) ? ptr->gobj_copy() : nullptr; } /** Get the underlying C instance from the C++ instance and acquire a @@ -171,7 +171,7 @@ typename T::BaseObjectType* unwrap_copy(const Glib::RefPtr<T>& ptr) template <class T> inline const typename T::BaseObjectType* unwrap_copy(const Glib::RefPtr<const T>& ptr) { - return (ptr) ? ptr->gobj_copy() : 0; + return (ptr) ? ptr->gobj_copy() : nullptr; } } // namespace Glib |