gravatar
kpeter (Peter Kovacs)
kpeter@inf.elte.hu
Bug fix in SmartGraph::restoreSnapshot() (#171)
0 1 0
default
1 file changed with 2 insertions and 2 deletions:
↑ Collapse diff ↑
Show white space 24 line context
... ...
@@ -721,26 +721,26 @@
721 721
    }
722 722

	
723 723
    void restoreSnapshot(const Snapshot &s)
724 724
    {
725 725
      while(s.arc_num<arcs.size()) {
726 726
        int n=arcs.size()-1;
727 727
        Edge arc=edgeFromId(n/2);
728 728
        Parent::notifier(Edge()).erase(arc);
729 729
        std::vector<Arc> dir;
730 730
        dir.push_back(arcFromId(n));
731 731
        dir.push_back(arcFromId(n-1));
732 732
        Parent::notifier(Arc()).erase(dir);
733
        nodes[arcs[n].target].first_out=arcs[n].next_out;
734
        nodes[arcs[n-1].target].first_out=arcs[n-1].next_out;
733
        nodes[arcs[n-1].target].first_out=arcs[n].next_out;
734
        nodes[arcs[n].target].first_out=arcs[n-1].next_out;
735 735
        arcs.pop_back();
736 736
        arcs.pop_back();
737 737
      }
738 738
      while(s.node_num<nodes.size()) {
739 739
        int n=nodes.size()-1;
740 740
        Node node = nodeFromId(n);
741 741
        Parent::notifier(Node()).erase(node);
742 742
        nodes.pop_back();
743 743
      }
744 744
    }
745 745

	
746 746
  public:
0 comments (0 inline)