Changeset 7f6e52f for db/threaded.cc
- Timestamp:
- 10/04/09 14:52:53 (4 years ago)
- Branches:
- master
- Children:
- b3686ec
- Parents:
- 2557eca
- git-author:
- Antti-Juhani Kaijanaho <antti-juhani@…> (10/04/09 14:52:53)
- git-committer:
- Antti-Juhani Kaijanaho <antti-juhani@…> (10/04/09 14:52:53)
- File:
-
- 1 edited
-
db/threaded.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
db/threaded.cc
r868b365 r7f6e52f 50 50 if (!tn->parent) return ptr(); 51 51 std::list<ptr>::iterator it = tn->sibling_iterator; 52 assert(it != tn->parent->children.end()); 52 53 it++; 53 54 if (it == tn->parent->children.end()) … … 78 79 p->children.push_back(shared_from_this()); 79 80 sibling_iterator = p->children.end(); 81 assert(sibling_iterator != p->children.begin()); 80 82 sibling_iterator--; 81 83 } … … 126 128 else 127 129 { 128 children.insert(it, 129 (*it)->children.begin(), 130 (*it)->children.end()); 130 for (std::list<ptr>::iterator jt = 131 (*it)->children.begin(); 132 jt != (*it)->children.end(); 133 jt++) 134 { 135 (*jt)->sibling_iterator = 136 children.insert(it, *jt); 137 (*jt)->parent = shared_from_this(); 138 } 139 131 140 std::list<ptr>::iterator next = it; 132 141 next++; 133 142 children.erase(it); 143 (*it)->parent.reset(); 134 144 it = next; 135 145 }
Note: See TracChangeset
for help on using the changeset viewer.
