summaryrefslogtreecommitdiff
path: root/glib/src/nodetree.hg
diff options
context:
space:
mode:
Diffstat (limited to 'glib/src/nodetree.hg')
-rw-r--r--glib/src/nodetree.hg29
1 files changed, 16 insertions, 13 deletions
diff --git a/glib/src/nodetree.hg b/glib/src/nodetree.hg
index 5a4a4b79..fb0ff7b5 100644
--- a/glib/src/nodetree.hg
+++ b/glib/src/nodetree.hg
@@ -185,7 +185,10 @@ public:
g_node_append(gobj(), node.gobj());
return node;
}
- _IGNORE(g_node_append)
+ dnl// Some glib functions are in fact preprocessor macros.
+ dnl// h2def.py does not recognize them. _IGNORE()ing them produces
+ dnl// ugly error messages in the generated nodetree.h file.
+ dnl// _IGNORE(g_node_append)
/** Inserts a NodeTree as the first child.
*
@@ -212,7 +215,7 @@ public:
insert(position, *node);
return node;
}
- _IGNORE(g_node_insert_data)
+ dnl// _IGNORE(g_node_insert_data)
/** Inserts a new NodeTree before the given sibling.
*
@@ -226,7 +229,7 @@ public:
insert_before(sibling, *node);
return node;
}
- _IGNORE(g_node_insert_data_before)
+ dnl// _IGNORE(g_node_insert_data_before)
/** Inserts a new NodeTree as the last child.
*
@@ -239,7 +242,7 @@ public:
append(*node);
return node;
}
- _IGNORE(g_node_append_data)
+ dnl// _IGNORE(g_node_append_data)
/** Inserts a new NodeTree as the first child.
*
@@ -252,7 +255,7 @@ public:
prepend(*node);
return node;
}
- _IGNORE(g_node_prepend_data)
+ dnl// _IGNORE(g_node_prepend_data)
/** Reverses the order of the children.
*/
@@ -334,7 +337,7 @@ public:
{
sigc::slot<void, GNode*, const T&, GNode**> real_slot = sigc::ptr_fun(on_compare_child);
- GNode* child = 0;
+ GNode* child = nullptr;
typedef sigc::slot<void, GNode*> type_foreach_gnode_slot;
type_foreach_gnode_slot bound_slot = sigc::bind(real_slot, the_data, &child);
@@ -367,7 +370,7 @@ public:
{
//We use a sigc::slot for the C callback, so we can bind some extra data.
sigc::slot<gboolean, GNode*, const T&, GNode**> real_slot = sigc::ptr_fun(on_compare_node);
- GNode* child = 0;
+ GNode* child = nullptr;
typedef sigc::slot<gboolean, GNode*> type_traverse_gnode_slot;
type_traverse_gnode_slot bound_slot = sigc::bind(real_slot, the_data, &child);
@@ -441,7 +444,7 @@ public:
{
return const_cast<NodeTree<T>*>(this)->first_child();
}
- _IGNORE(g_node_first_child)
+ dnl// _IGNORE(g_node_first_child)
/** Gets the last child.
*
@@ -515,7 +518,7 @@ public:
{
return const_cast<NodeTree<T>*>(this)->prev_sibling();
}
- _IGNORE(g_node_prev_sibling)
+ dnl// _IGNORE(g_node_prev_sibling)
/** Gets the next sibling
*
@@ -534,7 +537,7 @@ public:
{
return const_cast<NodeTree<T>*>(this)->next_sibling();
}
- _IGNORE(g_node_next_sibling)
+ dnl// _IGNORE(g_node_next_sibling)
/** Gets the last sibling.
*
@@ -687,11 +690,11 @@ private:
//Free the wrapped object (g_node_free not available)
g_slice_free(GNode, gobject_);
- gobject_ = 0;
+ gobject_ = nullptr;
}
///Create a new GNode, taking the contents of an existing node if one is specified.
- void clone(const NodeTree<T>* node = 0)
+ void clone(const NodeTree<T>* node = nullptr)
{
//Store the this pointer in the GNode so we can discover this wrapper later:
gobject_ = g_node_new(reinterpret_cast<gpointer>(this));
@@ -699,7 +702,7 @@ private:
if(node)
{
//Prepend the copied children of @node to the constructing node.
- for(const NodeTree<T>* i = node->last_child(); i != 0; i = i->prev_sibling())
+ for(const NodeTree<T>* i = node->last_child(); i != nullptr; i = i->prev_sibling())
prepend(*(new NodeTree<T>(*i)));
}
}