diff options
author | Murray Cumming <murrayc@murrayc.com> | 2008-08-26 13:38:29 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2008-08-26 13:38:29 +0000 |
commit | 37288be95e498f11b6e1ed447b7365dbc5c478a1 (patch) | |
tree | 8b71ffe6e6a7086d4eb31a2436847822c0ab0ad5 | |
parent | 6f1c4c2a86e412c462aedb0dfb6567d634bffce6 (diff) | |
download | glibmm-37288be95e498f11b6e1ed447b7365dbc5c478a1.tar.gz |
Actually use the copy constructor (or operator=), instead of just copying
2008-08-26 Murray Cumming <murrayc@murrayc.com>
* tests/glibmm_nodetree/main.cc: Actually use the copy constructor (or operator=),
instead of just copying the pointer.
svn path=/trunk/; revision=720
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | tests/glibmm_nodetree/main.cc | 2 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,10 @@ +2008-08-26 Murray Cumming,,, <murrayc@murrayc.com> + + reviewed by: <delete if not using a buddy> + patch by: <delete if not someone else's patch> + + * tests/glibmm_nodetree/main.cc: + 2008-08-26 Murray Cumming <murrayc@murrayc.com> * glib/src/nodetree.hg: Added an operator=() because we have a copy constructor. diff --git a/tests/glibmm_nodetree/main.cc b/tests/glibmm_nodetree/main.cc index a35bbb06..e1ca358f 100644 --- a/tests/glibmm_nodetree/main.cc +++ b/tests/glibmm_nodetree/main.cc @@ -119,7 +119,7 @@ int main() tstring.clear(); - node = root; //A deep copy. + node = new type_nodetree_string(*root); //A deep copy. g_assert(root->node_count(type_nodetree_string::TRAVERSE_ALL) == node->node_count(type_nodetree_string::TRAVERSE_ALL)); g_assert(root->get_max_height() == node->get_max_height()); root->traverse(sigc::bind(sigc::ptr_fun(node_build_string), sigc::ref(tstring)), Glib::TRAVERSE_IN_ORDER, type_nodetree_string::TRAVERSE_ALL, -1); |