Changeset 48f09f2f in mainline
- Timestamp:
- 2018-07-05T21:41:22Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e8ebed9
- Parents:
- bb02129
- git-author:
- Dzejrou <dzejrou@…> (2018-05-01 20:48:53)
- git-committer:
- Dzejrou <dzejrou@…> (2018-07-05 21:41:22)
- Location:
- uspace/lib/cpp/include/internal
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/include/internal/rbtree.hpp
rbb02129 r48f09f2f 313 313 } 314 314 315 node_type* find_parent_for_insertion(const value_type& val) const315 node_type* find_parent_for_insertion(const key_type& key) const 316 316 { 317 317 auto current = root_; … … 321 321 { 322 322 parent = current; 323 if (key_compare_(key _extractor_(val), key_extractor_(current->value)))323 if (key_compare_(key, key_extractor_(current->value))) 324 324 current = current->left; 325 325 else -
uspace/lib/cpp/include/internal/rbtree_policies.hpp
rbb02129 r48f09f2f 170 170 171 171 auto val = value_type{forward<Args>(args)...}; 172 auto parent = tree.find_parent_for_insertion( val);172 auto parent = tree.find_parent_for_insertion(tree.get_key(val)); 173 173 174 174 if (parent && tree.keys_equal(tree.get_key(parent->value), tree.get_key(val))) … … 189 189 using node_type = typename Tree::node_type; 190 190 191 auto parent = tree.find_parent_for_insertion( val);191 auto parent = tree.find_parent_for_insertion(tree.get_key(val)); 192 192 if (parent && tree.keys_equal(tree.get_key(parent->value), tree.get_key(val))) 193 193 return make_pair(iterator{parent, false}, false); … … 207 207 using node_type = typename Tree::node_type; 208 208 209 auto parent = tree.find_parent_for_insertion( val);209 auto parent = tree.find_parent_for_insertion(tree.get_key(val)); 210 210 if (parent && tree.keys_equal(tree.get_key(parent->value), tree.get_key(val))) 211 211 return make_pair(iterator{parent, false}, false); … … 388 388 using iterator = typename Tree::iterator; 389 389 390 auto parent = tree.find_parent_for_insertion( node->value);390 auto parent = tree.find_parent_for_insertion(tree.get_key(node->value)); 391 391 tree.insert_node(node, parent); 392 392
Note:
See TracChangeset
for help on using the changeset viewer.