diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/map.h | 3 | ||||
-rw-r--r-- | core/set.h | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/core/map.h b/core/map.h index 75a38a3440..a37d898a9c 100644 --- a/core/map.h +++ b/core/map.h @@ -453,8 +453,9 @@ private: if (!rp) rp = _data._nil; Element *node = (rp->left == _data._nil) ? rp->right : rp->left; + node->parent = rp->parent; - if (_data._root == (node->parent = rp->parent)) { + if (_data._root == node->parent) { _data._root->left = node; } else { if (rp == rp->parent->left) { diff --git a/core/set.h b/core/set.h index 317e180869..f68d78cea1 100644 --- a/core/set.h +++ b/core/set.h @@ -438,8 +438,9 @@ private: if (!rp) rp = _data._nil; Element *node = (rp->left == _data._nil) ? rp->right : rp->left; + node->parent = rp->parent; - if (_data._root == (node->parent = rp->parent)) { + if (_data._root == node->parent) { _data._root->left = node; } else { if (rp == rp->parent->left) { |