/////////////////////////////////////////////////////////////////////////////\r
//\r
// (C) Copyright Olaf Krzikalla 2004-2006.\r
-// (C) Copyright Ion Gaztañaga 2006-2007.\r
+// (C) Copyright Ion Gazta�aga 2006-2007.\r
//\r
// Distributed under the Boost Software License, Version 1.0.\r
// (See accompanying file LICENSE_1_0.txt or copy at\r
x = y_right; // x might be null.\r
}\r
else if(!y_right){ // z has exactly one non-null child. y == z.\r
- x = y_left; // x is not null.\r
+ x = y_left; // x is not null.\r
}\r
else{\r
y = minimum (y_right);\r
- x = NodeTraits::get_right(y); // x might be null.\r
+ x = NodeTraits::get_right(y); // x might be null.\r
}\r
\r
if(y != z){\r
//Since we've found the upper bound there is no other value with the same key if:\r
// - There is no previous node\r
// - The previous node is less than the key\r
- if(!prev || comp(prev, key)){\r
+ if(!prev || comp(prev, key)){\r
commit_data.link_left = left_child;\r
commit_data.node = y;\r
return std::pair<node_ptr, bool>(node_ptr(), true);\r
- }\r
+ }\r
//If the previous value was not less than key, it means that it's equal\r
//(because we've checked the upper bound)\r
else{\r
(const_node_ptr header, node_ptr hint, const KeyType &key\r
,KeyNodePtrCompare comp, insert_commit_data &commit_data)\r
{\r
- //hint must be bigger than the key\r
- if(hint == header || comp(key, hint)){\r
+ //hint must be bigger than the key\r
+ if(hint == header || comp(key, hint)){\r
node_ptr prev = hint;\r
//The previous value should be less than the key\r
- if(prev == NodeTraits::get_left(header) || comp((prev = prev_node(hint)), key)){\r
+ if(prev == NodeTraits::get_left(header) || comp((prev = prev_node(hint)), key)){\r
commit_data.link_left = unique(header) || !NodeTraits::get_left(hint);\r
commit_data.node = commit_data.link_left ? hint : prev;\r
return std::pair<node_ptr, bool>(node_ptr(), true);\r
- }\r
+ }\r
else{\r
return insert_unique_check(header, key, comp, commit_data);\r
//return std::pair<node_ptr, bool>(prev, false);\r
}\r
- }\r
+ }\r
//The hint was wrong, use hintless insert\r
else{\r
return insert_unique_check(header, key, comp, commit_data);\r