[glibmm] Glib: More nullptr instead of 0



commit 8516e068ea4eccbc4c7fd76df3ea03092fc325a5
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date:   Mon Nov 23 16:41:32 2015 +0100

    Glib: More nullptr instead of 0

 glib/glibmm/class.cc                 |    5 +---
 glib/glibmm/containerhandle_shared.h |    9 +++----
 glib/glibmm/containers.h             |    8 +++---
 glib/glibmm/helperlist.h             |    6 +---
 glib/glibmm/listhandle.h             |    3 +-
 glib/glibmm/main.cc                  |    5 +---
 glib/glibmm/object.h                 |    5 +--
 glib/glibmm/refptr.h                 |    3 +-
 glib/glibmm/slisthandle.h            |    5 +--
 glib/glibmm/ustring.h                |    5 +---
 glib/glibmm/value.h                  |    3 +-
 glib/glibmm/value_custom.h           |    9 ++-----
 glib/src/balancedtree.hg             |    6 ++--
 glib/src/binding.hg                  |   14 +++++-----
 glib/src/nodetree.hg                 |   42 +++++++++++++++++-----------------
 glib/src/threads.hg                  |   12 +++++-----
 16 files changed, 60 insertions(+), 80 deletions(-)
---
diff --git a/glib/glibmm/class.cc b/glib/glibmm/class.cc
index ab44e94..bf57f84 100644
--- a/glib/glibmm/class.cc
+++ b/glib/glibmm/class.cc
@@ -1,6 +1,3 @@
-// -*- c++ -*-
-/* $Id$ */
-
 /* Copyright (C) 1998-2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -66,7 +63,7 @@ void Class::register_derived_type(GType base_type, GTypeModule* module)
     instance_size,
     0, // n_preallocs
     nullptr, // instance_init
-    0, // value_table
+    nullptr, // value_table
   };
 
   if(!(base_query.type_name))
diff --git a/glib/glibmm/containerhandle_shared.h b/glib/glibmm/containerhandle_shared.h
index ddb7787..d88182d 100644
--- a/glib/glibmm/containerhandle_shared.h
+++ b/glib/glibmm/containerhandle_shared.h
@@ -1,4 +1,3 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_CONTAINERHANDLE_SHARED_H
 #define _GLIBMM_CONTAINERHANDLE_SHARED_H
 
@@ -149,7 +148,7 @@ struct TypeTraits<T*>
 
   static void    release_c_type (CType   ptr)
   {
-    GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+    GLIBMM_DEBUG_UNREFERENCE(nullptr, ptr);
     g_object_unref(ptr);
   }
 };
@@ -181,7 +180,7 @@ struct TypeTraits<const T*>
 
   static void    release_c_type (CType   ptr)
   {
-    GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+    GLIBMM_DEBUG_UNREFERENCE(nullptr, ptr);
     g_object_unref(const_cast<CTypeNonConst>(ptr));
   }
 };
@@ -215,7 +214,7 @@ struct TypeTraits< Glib::RefPtr<T> >
 
   static void    release_c_type (CType          ptr)
   {
-    GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+    GLIBMM_DEBUG_UNREFERENCE(nullptr, ptr);
     g_object_unref(ptr);
   }
 };
@@ -251,7 +250,7 @@ struct TypeTraits< Glib::RefPtr<const T> >
 
   static void    release_c_type (CType          ptr)
   {
-    GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+    GLIBMM_DEBUG_UNREFERENCE(nullptr, ptr);
     g_object_unref(const_cast<CTypeNonConst>(ptr));
   }
 };
diff --git a/glib/glibmm/containers.h b/glib/glibmm/containers.h
index a25ff6f..7bd4d8a 100644
--- a/glib/glibmm/containers.h
+++ b/glib/glibmm/containers.h
@@ -75,7 +75,7 @@ public:
   {}
 
   List_Iterator()
-   : head_(0), node_(0)
+   : head_(nullptr), node_(nullptr)
   {}
 
   List_Iterator(const Self& src)
@@ -146,7 +146,7 @@ public:
    {}
 
   SList_Iterator()
-   : node_(0)
+   : node_(nullptr)
    {}
 
   SList_Iterator(const Self& src)
@@ -205,7 +205,7 @@ public:
   {}
 
   List_Cpp_Iterator()
-  : head_(0), node_(0)
+  : head_(nullptr), node_(nullptr)
   {}
 
   List_Cpp_Iterator(const Self& src)
@@ -229,7 +229,7 @@ public:
       return *static_cast<pointer>(Glib::wrap_auto(cobj, false));
 #endif
     }
-    return *static_cast<pointer>(0); // boom!
+    return *static_cast<pointer>(nullptr); // boom!
   }
 
   pointer operator->() const { return &**this; }
diff --git a/glib/glibmm/helperlist.h b/glib/glibmm/helperlist.h
index 1b5c2c6..3000a8c 100644
--- a/glib/glibmm/helperlist.h
+++ b/glib/glibmm/helperlist.h
@@ -1,7 +1,5 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_HELPERLIST_H
 #define _GLIBMM_HELPERLIST_H
-/* $Id$ */
 
 /* helperlist.h
  *
@@ -44,7 +42,7 @@ class HelperList
 {
 public:
   HelperList()
-  : gparent_(0)
+  : gparent_(nullptr)
   {}
 
   HelperList(GObject* gp) //We use gp instead of gparent because that can cause warnings about a shadowed 
member.
@@ -164,7 +162,7 @@ protected:
 
   iterator end_() const
   {
-    return iterator(glist(), (GList*)0);
+    return iterator(glist(), (GList*)nullptr);
   }
 
   GObject* gparent_;
diff --git a/glib/glibmm/listhandle.h b/glib/glibmm/listhandle.h
index bdffe8e..b0aa1c8 100644
--- a/glib/glibmm/listhandle.h
+++ b/glib/glibmm/listhandle.h
@@ -1,4 +1,3 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_LISTHANDLE_H
 #define _GLIBMM_LISTHANDLE_H
 
@@ -88,7 +87,7 @@ template <class Tr, class Cont>
 struct ListSourceTraits<Tr,Cont*>
 {
   static GList* get_data(const Cont* array)
-    { return (array) ? Glib::Container_Helpers::create_list(array, Tr()) : 0; }
+    { return (array) ? Glib::Container_Helpers::create_list(array, Tr()) : nullptr; }
 
   static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW;
 };
diff --git a/glib/glibmm/main.cc b/glib/glibmm/main.cc
index d67b737..0f56977 100644
--- a/glib/glibmm/main.cc
+++ b/glib/glibmm/main.cc
@@ -1,6 +1,3 @@
-// -*- c++ -*-
-/* $Id$ */
-
 /* Copyright (C) 2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -441,7 +438,7 @@ void SignalTimeout::connect_seconds_once(const sigc::slot<void>& slot,
 
 SignalTimeout signal_timeout()
 {
-  return SignalTimeout(0); // 0 means default context
+  return SignalTimeout(nullptr); // nullptr means default context
 }
 
 
diff --git a/glib/glibmm/object.h b/glib/glibmm/object.h
index d172025..0ab2b78 100644
--- a/glib/glibmm/object.h
+++ b/glib/glibmm/object.h
@@ -1,4 +1,3 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_OBJECT_H
 #define _GLIBMM_OBJECT_H
 
@@ -195,7 +194,7 @@ struct TypeTraits< Glib::RefPtr<T> >
 
   static void release_c_type(CType ptr)
   {
-    GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+    GLIBMM_DEBUG_UNREFERENCE(nullptr, ptr);
     g_object_unref(ptr);
   }
 };
@@ -231,7 +230,7 @@ struct TypeTraits< Glib::RefPtr<const T> >
 
   static void release_c_type (CType ptr)
   {
-    GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+    GLIBMM_DEBUG_UNREFERENCE(nullptr, ptr);
     g_object_unref(const_cast<CTypeNonConst>(ptr));
   }
 };
diff --git a/glib/glibmm/refptr.h b/glib/glibmm/refptr.h
index df12ed6..5402241 100644
--- a/glib/glibmm/refptr.h
+++ b/glib/glibmm/refptr.h
@@ -1,4 +1,3 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_REFPTR_H
 #define _GLIBMM_REFPTR_H
 
@@ -174,7 +173,7 @@ public:
   inline void clear() noexcept;
 #endif //GLIBMM_DISABLE_DEPRECATED
 
-  /** Set underlying instance to 0, decrementing reference count of existing instance appropriately.
+  /** Set underlying instance to nullptr, decrementing reference count of existing instance appropriately.
    * @newin{2,16}
    */
   inline void reset() noexcept;
diff --git a/glib/glibmm/slisthandle.h b/glib/glibmm/slisthandle.h
index c5cf740..af8f305 100644
--- a/glib/glibmm/slisthandle.h
+++ b/glib/glibmm/slisthandle.h
@@ -1,4 +1,3 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_SLISTHANDLE_H
 #define _GLIBMM_SLISTHANDLE_H
 
@@ -88,7 +87,7 @@ template <class Tr, class Cont>
 struct SListSourceTraits<Tr,Cont*>
 {
   static GSList* get_data(const Cont* array)
-    { return (array) ? Glib::Container_Helpers::create_slist(array, Tr()) : 0; }
+    { return (array) ? Glib::Container_Helpers::create_slist(array, Tr()) : nullptr; }
 
   static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW;
 };
@@ -312,7 +311,7 @@ typename SListHandle<T,Tr>::const_iterator SListHandle<T,Tr>::begin() const
 template <class T, class Tr> inline
 typename SListHandle<T,Tr>::const_iterator SListHandle<T,Tr>::end() const
 {
-  return Glib::Container_Helpers::SListHandleIterator<Tr>(0);
+  return Glib::Container_Helpers::SListHandleIterator<Tr>(nullptr);
 }
 
 template <class T, class Tr>
diff --git a/glib/glibmm/ustring.h b/glib/glibmm/ustring.h
index fa3411b..94d6c35 100644
--- a/glib/glibmm/ustring.h
+++ b/glib/glibmm/ustring.h
@@ -1,9 +1,6 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_USTRING_H
 #define _GLIBMM_USTRING_H
 
-/* $Id$ */
-
 /* Copyright (C) 2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -1355,7 +1352,7 @@ template <class T1>
 inline // static
 ustring ustring::compose(const ustring& fmt)
 {
-  return ustring::compose_argv(fmt, 0, 0);
+  return ustring::compose_argv(fmt, 0, nullptr);
 }
 
 template <class T1>
diff --git a/glib/glibmm/value.h b/glib/glibmm/value.h
index 48c934f..2c5c570 100644
--- a/glib/glibmm/value.h
+++ b/glib/glibmm/value.h
@@ -1,4 +1,3 @@
-// -*- c++ -*-
 #ifndef _GLIBMM_VALUE_H
 #define _GLIBMM_VALUE_H
 
@@ -184,7 +183,7 @@ public:
 
 protected:
   void set_cstring(const char* data);
-  const char* get_cstring() const; // never returns 0
+  const char* get_cstring() const; // never returns nullptr
 };
 
 } // namespace Glib
diff --git a/glib/glibmm/value_custom.h b/glib/glibmm/value_custom.h
index cdb9f93..bfcd074 100644
--- a/glib/glibmm/value_custom.h
+++ b/glib/glibmm/value_custom.h
@@ -1,6 +1,3 @@
-// -*- c++ -*-
-/* $Id$ */
-
 /* Copyright 2002 The gtkmm Development Team
  *
  * This library is free software; you can redistribute it and/or
@@ -206,21 +203,21 @@ template <class T, class PtrT> inline
 GType Value_Pointer<T,PtrT>::value_type()
 {
   // Dispatch to the specific value_type_() overload.
-  return Value_Pointer<T,PtrT>::value_type_(static_cast<T*>(0));
+  return Value_Pointer<T,PtrT>::value_type_(static_cast<T*>(nullptr));
 }
 
 template <class T, class PtrT> inline
 void Value_Pointer<T,PtrT>::set(PtrT data)
 {
   // Dispatch to the specific set_() overload.
-  this->set_(data, static_cast<T*>(0));
+  this->set_(data, static_cast<T*>(nullptr));
 }
 
 template <class T, class PtrT> inline
 PtrT Value_Pointer<T,PtrT>::get() const
 {
   // Dispatch to the specific get_() overload.
-  return this->get_(static_cast<T*>(0));
+  return this->get_(static_cast<T*>(nullptr));
 }
 
 
diff --git a/glib/src/balancedtree.hg b/glib/src/balancedtree.hg
index 9c59020..f9190e5 100644
--- a/glib/src/balancedtree.hg
+++ b/glib/src/balancedtree.hg
@@ -160,7 +160,7 @@ public:
    * fast.
    *
    * @param key The key to look up.
-   * @result The value corresponding to the key, or 0 if the key was
+   * @result The value corresponding to the key, or <tt>nullptr</tt> if the key was
    * not found.
    */
   V* lookup(const K &key)
@@ -230,7 +230,7 @@ public:
    *
    * @param search_func A function used to search the BalancedTree.
    * @param key The key to search for.
-   * @result The value corresponding to the found key, or <tt>0</tt> if the key
+   * @result The value corresponding to the found key, or <tt>nullptr</tt> if the key
    * was not found.
    */
   V* search(const CompareFunc &search_func, const K& key)
@@ -253,7 +253,7 @@ public:
    *
    * @param search_func A function used to search the BalancedTree.
    * @param key The key to search for.
-   * @result The value corresponding to the found key, or <tt>0</tt> if the key
+   * @result The value corresponding to the found key, or <tt>nullptr</tt> if the key
    * was not found.
    */
   const V* search(const CompareFunc &search_func, const K& key) const
diff --git a/glib/src/binding.hg b/glib/src/binding.hg
index 5b5dd4b..bc8cc36 100644
--- a/glib/src/binding.hg
+++ b/glib/src/binding.hg
@@ -133,7 +133,7 @@ public:
    * @param transform_from The transformation function from the target to the source,
    *        or an empty slot to use the default.
    * @return The Binding instance representing the binding between the two
-   *         Glib::ObjectBase instances, or <tt>0</tt> in case of error.
+   *         Glib::ObjectBase instances, or <tt>nullptr</tt> in case of error.
    *
    * @newin{2,44}
    */
@@ -152,7 +152,7 @@ public:
    * @param target_property The target property to bind.
    * @param flags Flags to pass to Binding.
    * @return The Binding instance representing the binding between the two
-   *         Glib::ObjectBase instances, or <tt>0</tt> in case of error.
+   *         Glib::ObjectBase instances, or <tt>nullptr</tt> in case of error.
    *
    * @see bind_property_value()
    *
@@ -175,7 +175,7 @@ public:
    * @param transform_to The transformation function from the source to the target,
    *        or an empty slot to use the default.
    * @return The Binding instance representing the binding between the two
-   *         Glib::ObjectBase instances, or <tt>0</tt> in case of error.
+   *         Glib::ObjectBase instances, or <tt>nullptr</tt> in case of error.
    *
    * @tparam T_source Type of the source property. Must be a type that can be
    *         stored in a Glib::Value<T_source> object.
@@ -211,7 +211,7 @@ public:
    * @param transform_to The transformation function from the source to the target,
    *        or an empty slot to use the default.
    * @return The Binding instance representing the binding between the two
-   *         Glib::ObjectBase instances, or <tt>0</tt> in case of error.
+   *         Glib::ObjectBase instances, or <tt>nullptr</tt> in case of error.
    *
    * @tparam T_source Type of the source property. Must be a type that can be
    *         stored in a Glib::Value<T_source> object.
@@ -247,7 +247,7 @@ public:
    * @param transform_to The transformation function from the source to the target,
    *        or an empty slot to use the default.
    * @return The Binding instance representing the binding between the two
-   *         Glib::ObjectBase instances, or <tt>0</tt> in case of error.
+   *         Glib::ObjectBase instances, or <tt>nullptr</tt> in case of error.
    *
    * @tparam T_source Type of the source property. Must be a type that can be
    *         stored in a Glib::Value<T_source> object.
@@ -283,7 +283,7 @@ public:
    * @param transform_to The transformation function from the source to the target,
    *        or an empty slot to use the default.
    * @return The Binding instance representing the binding between the two
-   *         Glib::ObjectBase instances, or <tt>0</tt> in case of error.
+   *         Glib::ObjectBase instances, or <tt>nullptr</tt> in case of error.
    *
    * @tparam T_source Type of the source property. Must be a type that can be
    *         stored in a Glib::Value<T_source> object.
@@ -321,7 +321,7 @@ public:
    * @param transform_from The transformation function from the target to the source,
    *        or an empty slot to use the default.
    * @return The Binding instance representing the binding between the two
-   *         Glib::ObjectBase instances, or <tt>0</tt> in case of error.
+   *         Glib::ObjectBase instances, or <tt>nullptr</tt> in case of error.
    *
    * @tparam T_source Type of the source property. Must be a type that can be
    *         stored in a Glib::Value<T_source> object.
diff --git a/glib/src/nodetree.hg b/glib/src/nodetree.hg
index 60e8276..ec6a545 100644
--- a/glib/src/nodetree.hg
+++ b/glib/src/nodetree.hg
@@ -76,7 +76,7 @@ private:
   static NodeTree<T>* wrap(GNode* node)
   {
     if (!node)
-      return 0;
+      return nullptr;
 
     return reinterpret_cast<NodeTree<T>* >(node->data);
   }
@@ -333,7 +333,7 @@ public:
    *
    * @param flags Which types of children are to be visited, one of TRAVERSE_ALL, TRAVERSE_LEAVES and 
TRAVERSE_NON_LEAVES.
    * @param the_data The data for which to search.
-   * @return the found child, or 0 if the data is not found
+   * @return the found child, or <tt>nullptr</tt> if the data is not found
    */
   NodeTree<T>* find_child(const T& the_data, TraverseFlags flags = TRAVERSE_ALL)
   {
@@ -352,7 +352,7 @@ public:
    *
    * @param flags Which types of children are to be visited, one of TRAVERSE_ALL, TRAVERSE_LEAVES and 
TRAVERSE_NON_LEAVES.
    * @param the_data The data for which to search.
-   * @return the found child, or 0 if the data is not found
+   * @return the found child, or <tt>nullptr</tt> if the data is not found
    */
   const NodeTree<T>* find_child(const T& the_data, TraverseFlags flags = TRAVERSE_ALL) const
   {
@@ -366,7 +366,7 @@ public:
    * @param order The order in which nodes are visited: IN_ORDER, TRAVERSE_PRE_ORDER, TRAVERSE_POST_ORDER, 
or TRAVERSE_LEVEL_ORDER
    * @param flags Which types of children are to be visited: one of TRAVERSE_ALL, TRAVERSE_LEAVES and 
TRAVERSE_NON_LEAVES.
    * @param the_data The data for which to search.
-   * @return The found node, or 0 if the data is not found.
+   * @return The found node, or <tt>nullptr</tt> if the data is not found.
    */
   NodeTree<T>* find(const T& the_data, TraverseType order = TRAVERSE_IN_ORDER, TraverseFlags flags = 
TRAVERSE_ALL)
   {
@@ -387,7 +387,7 @@ public:
    * @param order The order in which nodes are visited.
    * @param flags Which types of children are to be visited.
    * @param the_data The data for which to search.
-   * @return The found node, or 0 if the data is not found.
+   * @return The found node, or <tt>nullptr</tt> if the data is not found.
    */
   const NodeTree<T>* find(const T& the_data, TraverseType order = TRAVERSE_IN_ORDER, TraverseFlags flags = 
TRAVERSE_ALL) const
   {
@@ -404,7 +404,7 @@ public:
   {
     int n = 0;
 
-    for(const NodeTree<T>* i = first_child();  i != 0; i = i->next_sibling())
+    for(const NodeTree<T>* i = first_child();  i != nullptr; i = i->next_sibling())
     {
       if((i->data()) == the_data)
         return n;
@@ -431,7 +431,7 @@ public:
 
   /** Gets the first child.
    *
-   * @return The first child, or 0 if the node has no children.
+   * @return The first child, or <tt>nullptr</tt> if the node has no children.
    */
   NodeTree<T>* first_child()
   {
@@ -440,7 +440,7 @@ public:
 
   /** Gets the first child.
    *
-   * @return The first child, or 0 if the node has no children.
+   * @return The first child, or <tt>nullptr</tt> if the node has no children.
    */
   const NodeTree<T>* first_child() const
   {
@@ -450,7 +450,7 @@ public:
 
   /** Gets the last child.
    *
-   * @return The last child, or 0 if the node has no children.
+   * @return The last child, or <tt>nullptr</tt> if the node has no children.
    */
   NodeTree<T>* last_child()
   {
@@ -459,7 +459,7 @@ public:
 
   /** Gets the last child.
    *
-   * @return The last child, or 0 if the node has no children.
+   * @return The last child, or <tt>nullptr</tt> if the node has no children.
    */
   const NodeTree<T>* last_child() const
   {
@@ -469,7 +469,7 @@ public:
 
   /** Gets the nth child.
    *
-   * @return The nth child, or 0 if n is too large.
+   * @return The nth child, or <tt>nullptr</tt> if n is too large.
    */
   NodeTree<T>* nth_child(int n)
   {
@@ -478,7 +478,7 @@ public:
 
   /** Gets the nth child.
    *
-   * @return The nth child, or 0 if n is too large.
+   * @return The nth child, or <tt>nullptr</tt> if n is too large.
    */
   const NodeTree<T>* nth_child(int n) const
   {
@@ -487,7 +487,7 @@ public:
   _IGNORE(g_node_nth_child)
 
   /** Gets the first sibling
-   * @return The first sibling, or 0 if the node has no siblings.
+   * @return The first sibling, or <tt>nullptr</tt> if the node has no siblings.
    */
   NodeTree<T>* first_sibling()
   {
@@ -495,7 +495,7 @@ public:
   }
 
   /** Gets the first sibling
-   * @return The first sibling, or 0 if the node has no siblings.
+   * @return The first sibling, or <tt>nullptr</tt> if the node has no siblings.
    */
   const NodeTree<T>* first_sibling() const
   {
@@ -505,7 +505,7 @@ public:
 
   /** Gets the previous sibling.
    *
-   * @return The previous sibling, or 0 if the node has no siblings.
+   * @return The previous sibling, or <tt>nullptr</tt> if the node has no siblings.
    */
   NodeTree<T>* prev_sibling()
   {
@@ -514,7 +514,7 @@ public:
 
   /** Gets the previous sibling.
    *
-   * @return The previous sibling, or 0 if the node has no siblings.
+   * @return The previous sibling, or <tt>nullptr</tt> if the node has no siblings.
    */
   const NodeTree<T>* prev_sibling() const
   {
@@ -524,7 +524,7 @@ public:
 
   /** Gets the next sibling
    *
-   * @return The next sibling, or 0 if the node has no siblings.
+   * @return The next sibling, or <tt>nullptr</tt> if the node has no siblings.
    */
   NodeTree<T>* next_sibling()
   {
@@ -533,7 +533,7 @@ public:
 
   /** Gets the next sibling
    *
-   * @return The next sibling, or 0 if the node has no siblings.
+   * @return The next sibling, or <tt>nullptr</tt> if the node has no siblings.
    */
   const NodeTree<T>* next_sibling() const
   {
@@ -543,7 +543,7 @@ public:
 
   /** Gets the last sibling.
    *
-   * @return The last sibling, or 0 if the node has no siblings.
+   * @return The last sibling, or <tt>nullptr</tt> if the node has no siblings.
    */
   NodeTree<T>* last_sibling()
   {
@@ -552,7 +552,7 @@ public:
 
   /** Gets the last sibling.
    *
-   * @return The last sibling, or 0 if the node has no siblings.
+   * @return The last sibling, or <tt>nullptr</tt> if the node has no siblings.
    */
   const NodeTree<T>* last_sibling() const
   {
@@ -726,7 +726,7 @@ private:
   /// Method for comparing a single child (Internal use).
   static void on_compare_child(GNode* node, const T& needle, GNode** result)
   {
-    if((0 != result) && (wrap(node)->data() == needle))
+    if((nullptr != result) && (wrap(node)->data() == needle))
     {
       *result = node;
     }
diff --git a/glib/src/threads.hg b/glib/src/threads.hg
index 691af05..19d1200 100644
--- a/glib/src/threads.hg
+++ b/glib/src/threads.hg
@@ -509,7 +509,7 @@ public:
    *   const gint64 end_time = g_get_monotonic_time() + 5 * G_TIME_SPAN_SECOND;
    *   while (!current_data)
    *     if (!data_cond.wait_until(data_mutex, end_time)
-   *       return 0; // timeout
+   *       return nullptr; // timeout
    *
    *   void* const data = current_data;
    *   current_data = nullptr;
@@ -565,15 +565,15 @@ public:
 
   /** Constructor.
    *
-   * @param destructor_func Function pointer, or 0. If @a destructor_func is not 0
-   * and the stored data pointer is not 0, this function is called when replace()
+   * @param destructor_func Function pointer, or <tt>nullptr</tt>. If @a destructor_func is not 
<tt>nullptr</tt>
+   * and the stored data pointer is not <tt>nullptr</tt>, this function is called when replace()
    * is called and when the thread exits.
    */
   explicit inline Private(DestructorFunc destructor_func = &Private<T>::delete_ptr);
 
   /** Gets the pointer stored in the calling thread.
    *
-   * @return If no value has yet been set in this thread, 0 is returned.
+   * @return If no value has yet been set in this thread, <tt>nullptr</tt> is returned.
    */
   inline T* get();
 
@@ -582,8 +582,8 @@ public:
   inline void set(T* data);
 
   /** Sets the pointer in the calling thread and calls <tt>destructor_func()</tt>.
-   * If a function pointer (and not 0) was specified in the constructor, and
-   * the stored data pointer before the call to replace() is not 0, then
+   * If a function pointer (and not <tt>nullptr</tt>) was specified in the constructor, and
+   * the stored data pointer before the call to replace() is not <tt>nullptr</tt>, then
    * <tt>destructor_func()</tt> is called with this old pointer value.
    *
    * @newin{2,32}


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