[glibmm] Use nullptr instead of 0.



commit 52940373276a2cbaae7c2e536e75aff5326b3a3e
Author: Murray Cumming <murrayc murrayc com>
Date:   Thu Nov 19 11:42:26 2015 +0100

    Use nullptr instead of 0.

 gio/src/action.ccg                          |    2 +-
 glib/glibmm/wrap.h                          |   16 ++++++++--------
 tools/extra_defs_gen/generate_extra_defs.cc |    2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/gio/src/action.ccg b/gio/src/action.ccg
index cc9a5f4..5b5d3bd 100644
--- a/gio/src/action.ccg
+++ b/gio/src/action.ccg
@@ -26,7 +26,7 @@ namespace Gio
 
 void Action::activate()
 {
-  g_action_activate(gobj(), 0);
+  g_action_activate(gobj(), nullptr);
 }
 
 } // namespace Gio
diff --git a/glib/glibmm/wrap.h b/glib/glibmm/wrap.h
index f898785..9b7d141 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
diff --git a/tools/extra_defs_gen/generate_extra_defs.cc b/tools/extra_defs_gen/generate_extra_defs.cc
index bc8a78c..abdd437 100644
--- a/tools/extra_defs_gen/generate_extra_defs.cc
+++ b/tools/extra_defs_gen/generate_extra_defs.cc
@@ -187,7 +187,7 @@ std::string get_signals(GType gtype, GTypeIsAPointerFunc is_a_pointer_func)
 
 
       //Other information about the signal:
-      GSignalQuery signalQuery = { 0, 0, 0, GSignalFlags(0), 0, 0, 0, };
+      GSignalQuery signalQuery = { 0, nullptr, 0, GSignalFlags(0), 0, 0, nullptr, };
       g_signal_query(signal_id, &signalQuery);
 
       //Return type:


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