lemon/core.h
changeset 1027 8b2b9e61d8ce
parent 1026 699c7eac2c6d
child 1069 d1a48668ddb4
     1.1 --- a/lemon/core.h	Wed Jan 11 22:21:07 2012 +0100
     1.2 +++ b/lemon/core.h	Wed Jan 11 22:43:50 2012 +0100
     1.3 @@ -1209,11 +1209,10 @@
     1.4        typedef typename To::Node Value;
     1.5  
     1.6        Value operator[](const Key& key) const {
     1.7 -        std::pair<RedNode, BlueNode> red_blue_pair = _from.asRedBlueNode(key);
     1.8 -        if (red_blue_pair.first != INVALID) {
     1.9 -          return _red_node_ref[red_blue_pair.first];
    1.10 +        if (_from.red(key)) {
    1.11 +          return _red_node_ref[_from.asRedNodeUnsafe(key)];
    1.12          } else {
    1.13 -          return _blue_node_ref[red_blue_pair.second];
    1.14 +          return _blue_node_ref[_from.asBlueNodeUnsafe(key)];
    1.15          }
    1.16        }
    1.17