equal
deleted
inserted
replaced
714 |
714 |
715 void firstBNode(Node& node) const { |
715 void firstBNode(Node& node) const { |
716 node.id = first_bnode != -1 ? (first_bnode << 1) + 1 : -1; |
716 node.id = first_bnode != -1 ? (first_bnode << 1) + 1 : -1; |
717 } |
717 } |
718 void nextBNode(Node& node) const { |
718 void nextBNode(Node& node) const { |
719 node.id = aNodes[node.id >> 1].next_node; |
719 node.id = bNodes[node.id >> 1].next_node; |
720 } |
720 } |
721 |
721 |
722 void first(Node& node) const { |
722 void first(Node& node) const { |
723 if (first_anode != -1) { |
723 if (first_anode != -1) { |
724 node.id = (first_anode << 1); |
724 node.id = (first_anode << 1); |
859 return Node(aNodeId << 1); |
859 return Node(aNodeId << 1); |
860 } |
860 } |
861 |
861 |
862 Node addBNode() { |
862 Node addBNode() { |
863 int bNodeId; |
863 int bNodeId; |
864 if (first_free_anode == -1) { |
864 if (first_free_bnode == -1) { |
865 bNodeId = bNodes.size(); |
865 bNodeId = bNodes.size(); |
866 bNodes.push_back(NodeT()); |
866 bNodes.push_back(NodeT()); |
867 } else { |
867 } else { |
868 bNodeId = first_free_bnode; |
868 bNodeId = first_free_bnode; |
869 first_free_bnode = bNodes[first_free_bnode].next_node; |
869 first_free_bnode = bNodes[first_free_bnode].next_node; |