changeset 243 | 32155c88f59b |
parent 238 | 79643f6e8c52 |
parent 235 | b46d2787e9c2 |
child 280 | e7f8647ce760 |
1.1 --- a/lemon/list_graph.h Tue Jul 29 14:41:55 2008 +0200 1.2 +++ b/lemon/list_graph.h Tue Jul 29 15:06:37 2008 +0200 1.3 @@ -842,7 +842,9 @@ 1.4 explicit Arc(int pid) { id = pid;} 1.5 1.6 public: 1.7 - operator Edge() const { return edgeFromId(id / 2); } 1.8 + operator Edge() const { 1.9 + return id != -1 ? edgeFromId(id / 2) : INVALID; 1.10 + } 1.11 1.12 Arc() {} 1.13 Arc (Invalid) { id = -1; }