gravatar
deba@inf.elte.hu
deba@inf.elte.hu
Converting INVALID arc to INVALID edge
0 2 0
default
2 files changed with 6 insertions and 2 deletions:
↑ Collapse diff ↑
Ignore white space 6 line context
... ...
@@ -842,7 +842,9 @@
842 842
      explicit Arc(int pid) { id = pid;}
843 843

	
844 844
    public:
845
      operator Edge() const { return edgeFromId(id / 2); }
845
      operator Edge() const { 
846
        return id != -1 ? edgeFromId(id / 2) : INVALID; 
847
      }
846 848

	
847 849
      Arc() {}
848 850
      Arc (Invalid) { id = -1; }
Ignore white space 6 line context
... ...
@@ -465,7 +465,9 @@
465 465
      explicit Arc(int id) { _id = id;}
466 466

	
467 467
    public:
468
      operator Edge() const { return edgeFromId(_id / 2); }
468
      operator Edge() const { 
469
        return _id != -1 ? edgeFromId(_id / 2) : INVALID; 
470
      }
469 471

	
470 472
      Arc() {}
471 473
      Arc (Invalid) { _id = -1; }
0 comments (0 inline)