Changeset 897:ef09eee53b09 in lemon-0.x for src/hugo/default_map.h
- Timestamp:
- 09/22/04 10:04:31 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1205
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/hugo/default_map.h
r891 r897 38 38 typedef typename MapRegistry::Graph Graph; \ 39 39 \ 40 DefaultMap() : Parent() {} \41 40 DefaultMap(const Graph& g, MapRegistry& r) : Parent(g, r) {} \ 42 41 DefaultMap(const Graph& g, MapRegistry& r, const Value& v) \ … … 45 44 : Parent(static_cast<const Parent&>(copy)) {} \ 46 45 template <typename TT> \ 47 DefaultMap(const DefaultMap<MapRegistry, TT>& copy) { \ 46 DefaultMap(const DefaultMap<MapRegistry, TT>& copy) \ 47 : { \ 48 48 Parent::MapBase::operator= \ 49 49 (static_cast<const typename Parent::MapBase&>(copy)); \ … … 61 61 template <typename TT> \ 62 62 DefaultMap& operator=(const DefaultMap<MapRegistry, TT>& copy) { \ 63 Parent::clear(); \ 64 Parent::MapBase::operator=(copy); \ 63 if (Parent::getGraph() != copy.getGraph()) { \ 64 Parent::clear(); \ 65 Parent::MapBase::operator=(copy); \ 66 Parent::construct(); \ 67 } \ 65 68 if (Parent::getGraph()) { \ 66 69 for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\ 67 Parent::add(it); \68 70 Parent::operator[](it) = copy[it]; \ 69 71 } \
Note: See TracChangeset
for help on using the changeset viewer.