projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
stopped the hemorrhaging at least with tree
[feisty_meow.git]
/
nucleus
/
library
/
nodes
/
tree.cpp
diff --git
a/nucleus/library/nodes/tree.cpp
b/nucleus/library/nodes/tree.cpp
index 59ca5d70cc3cae4b1c337e2ea45880cab53859b4..08dd6df0b431bf5d1389ae46ce1647bc351c69bb 100644
(file)
--- a/
nucleus/library/nodes/tree.cpp
+++ b/
nucleus/library/nodes/tree.cpp
@@
-17,14
+17,16
@@
#include <basis/common_outcomes.h>
#include <basis/functions.h>
#include <basis/guards.h>
#include <basis/common_outcomes.h>
#include <basis/functions.h>
#include <basis/guards.h>
+#include <loggers/program_wide_logger.h>
-
//
#define DEBUG_TREE
+#define DEBUG_TREE
// uncomment if you want lots of debugging info.
#undef LOG
#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s)
using namespace basis;
// uncomment if you want lots of debugging info.
#undef LOG
#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s)
using namespace basis;
+using namespace loggers;
namespace nodes {
namespace nodes {
@@
-274,6
+276,7
@@
tree::tree()
tree::~tree()
{
tree::~tree()
{
+ FUNCDEF("destructor");
// must at least unhook ourselves from the parent so we don't become a lost
// cousin.
tree *my_parent = parent();
// must at least unhook ourselves from the parent so we don't become a lost
// cousin.
tree *my_parent = parent();
@@
-306,8
+309,11
@@
tree::~tree()
// or there are no kids at all.
curr_node = curr_node->branch(0);
// or there are no kids at all.
curr_node = curr_node->branch(0);
- if (curr_node = NULL_POINTER) {
+LOG(a_sprintf("loop traverse on %p", curr_node));
+
+ if (curr_node == NULL_POINTER) {
// wayback has no children, so we can take action.
// wayback has no children, so we can take action.
+LOG(a_sprintf("inside null condition, loop traverse on %p", curr_node));
// if wayback is the same as "this", then we exit from iterations since
// we've cleaned all the kids out.
// if wayback is the same as "this", then we exit from iterations since
// we've cleaned all the kids out.