summaryrefslogtreecommitdiff
path: root/glib/src/nodetree.hg
diff options
context:
space:
mode:
authorKjell Ahlstedt <kjell.ahlstedt@bredband.net>2015-11-23 16:41:32 +0100
committerKjell Ahlstedt <kjell.ahlstedt@bredband.net>2015-11-23 16:41:32 +0100
commit8516e068ea4eccbc4c7fd76df3ea03092fc325a5 (patch)
tree1e3d0f30775551667e43fe9a7845aea0afab79db /glib/src/nodetree.hg
parent0d13b4b18bd0aa607e7a8a244f6cea2415cd9f47 (diff)
downloadglibmm-8516e068ea4eccbc4c7fd76df3ea03092fc325a5.tar.gz
Glib: More nullptr instead of 0
Diffstat (limited to 'glib/src/nodetree.hg')
-rw-r--r--glib/src/nodetree.hg42
1 files changed, 21 insertions, 21 deletions
diff --git a/glib/src/nodetree.hg b/glib/src/nodetree.hg
index 60e8276e..ec6a5456 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;
}