diff -r 2eebc8f7dca5 -r 17e36e175725 lemon/core.h --- a/lemon/core.h Tue Nov 01 08:24:30 2011 +0100 +++ b/lemon/core.h Tue Dec 20 17:35:45 2011 +0100 @@ -394,6 +394,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(); } @@ -421,6 +422,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(); }