# HG changeset patch # User alpar # Date 1084119716 0 # Node ID 5c1465127b79e78dc4343209107b47a669701e34 # Parent d89575370bcb0458f004ab0ce53c81dc71aa6841 Changes in the Maps' copy constructors. diff -r d89575370bcb -r 5c1465127b79 src/hugo/list_graph.h --- a/src/hugo/list_graph.h Sun May 09 16:20:41 2004 +0000 +++ b/src/hugo/list_graph.h Sun May 09 16:21:56 2004 +0000 @@ -419,7 +419,8 @@ ///\todo It can copy between different types. /// template NodeMap(const NodeMap &m) : - DynMapBase(*m.G) + DynMapBase(*m.G), container(m.container.size()) + { G->dyn_node_maps.push_back(this); typename std::vector::const_iterator i; @@ -511,7 +512,7 @@ ///\todo It can copy between different types. /// template EdgeMap(const EdgeMap &m) : - DynMapBase(*m.G) + DynMapBase(*m.G), container(m.container.size()) { G->dyn_edge_maps.push_back(this); typename std::vector::const_iterator i; @@ -662,7 +663,7 @@ /// template SymEdgeMap(const SymEdgeMap &m) : - DynMapBase(*m.G) + DynMapBase(*m.G), container(m.container.size()) { G->dyn_node_maps.push_back(this); typename std::vector::const_iterator i; @@ -1033,7 +1034,7 @@ ///\todo It can copy between different types. /// template NodeMap(const NodeMap &m) : - DynMapBase(*m.G) + DynMapBase(*m.G), container(m.container.size()) { G->dyn_node_maps.push_back(this); typename std::vector::const_iterator i; @@ -1555,7 +1556,7 @@ ///\todo It can copy between different types. /// template EdgeMap(const EdgeMap &m) : - DynMapBase(*m.G) + DynMapBase(*m.G), container(m.container.size()) { G->dyn_edge_maps.push_back(this); typename std::vector::const_iterator i; diff -r d89575370bcb -r 5c1465127b79 src/hugo/smart_graph.h --- a/src/hugo/smart_graph.h Sun May 09 16:20:41 2004 +0000 +++ b/src/hugo/smart_graph.h Sun May 09 16:21:56 2004 +0000 @@ -63,7 +63,7 @@ public: template class EdgeMap; - template class EdgeMap; + template class NodeMap; class Node; class Edge; @@ -307,9 +307,9 @@ template friend class NodeMap; ///\todo It can copy between different types. - /// + ///\todo We could use 'copy' template NodeMap(const NodeMap &m) : - DynMapBase(*m.G) + DynMapBase(*m.G), container(m.container.size()) { G->dyn_node_maps.push_back(this); typename std::vector::const_iterator i; @@ -398,9 +398,8 @@ template friend class EdgeMap; ///\todo It can copy between different types. - /// - template EdgeMap(const EdgeMap &m) : - DynMapBase(*m.G) + template EdgeMap(const EdgeMap &m) + : DynMapBase(*m.G), container(m.container.size()) { G->dyn_edge_maps.push_back(this); typename std::vector::const_iterator i; @@ -541,8 +540,8 @@ ///\todo It can copy between different types. /// - template SymEdgeMap(const SymEdgeMap &m) : - DynMapBase(*m.G) + template SymEdgeMap(const SymEdgeMap &m) + : DynMapBase(*m.G), container(m.container.size()) { G->dyn_node_maps.push_back(this); typename std::vector::const_iterator i; @@ -613,4 +612,4 @@ -#endif //SMART_GRAPH_H +#endif //HUGO_SMART_GRAPH_H