diff -r 1aa7eba26af5 -r bb871cb8ac06 lemon/core.h --- a/lemon/core.h Mon Apr 12 13:59:41 2010 +0200 +++ b/lemon/core.h Tue Jun 22 15:39:26 2010 +0200 @@ -384,6 +384,7 @@ template static void copy(const From& from, Digraph &to, NodeRefMap& nodeRefMap, ArcRefMap& arcRefMap) { + to.clear(); for (typename From::NodeIt it(from); it != INVALID; ++it) { nodeRefMap[it] = to.addNode(); } @@ -411,6 +412,7 @@ template static void copy(const From& from, Graph &to, NodeRefMap& nodeRefMap, EdgeRefMap& edgeRefMap) { + to.clear(); for (typename From::NodeIt it(from); it != INVALID; ++it) { nodeRefMap[it] = to.addNode(); }