changeset 243 | 32155c88f59b |
parent 220 | a5d8c039f218 |
child 280 | e7f8647ce760 |
1.1 --- a/lemon/smart_graph.h Tue Jul 29 14:41:55 2008 +0200 1.2 +++ b/lemon/smart_graph.h Tue Jul 29 15:06:37 2008 +0200 1.3 @@ -465,7 +465,9 @@ 1.4 explicit Arc(int id) { _id = id;} 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; }