1.1 --- a/lemon/core.h Mon Apr 12 13:59:41 2010 +0200
1.2 +++ b/lemon/core.h Tue Jun 22 15:39:26 2010 +0200
1.3 @@ -384,6 +384,7 @@
1.4 template <typename From, typename NodeRefMap, typename ArcRefMap>
1.5 static void copy(const From& from, Digraph &to,
1.6 NodeRefMap& nodeRefMap, ArcRefMap& arcRefMap) {
1.7 + to.clear();
1.8 for (typename From::NodeIt it(from); it != INVALID; ++it) {
1.9 nodeRefMap[it] = to.addNode();
1.10 }
1.11 @@ -411,6 +412,7 @@
1.12 template <typename From, typename NodeRefMap, typename EdgeRefMap>
1.13 static void copy(const From& from, Graph &to,
1.14 NodeRefMap& nodeRefMap, EdgeRefMap& edgeRefMap) {
1.15 + to.clear();
1.16 for (typename From::NodeIt it(from); it != INVALID; ++it) {
1.17 nodeRefMap[it] = to.addNode();
1.18 }