src/lemon/default_map.h
changeset 942 75fdd0c6866d
parent 921 818510fa3d99
child 946 c94ef40a22ce
equal deleted inserted replaced
0:f3392e68b942 1:62b608736e36
    57   : Parent(g, r, v) {} \
    57   : Parent(g, r, v) {} \
    58 DefaultMap(const DefaultMap& copy) \
    58 DefaultMap(const DefaultMap& copy) \
    59   : Parent(static_cast<const Parent&>(copy)) {} \
    59   : Parent(static_cast<const Parent&>(copy)) {} \
    60 template <typename TT> \
    60 template <typename TT> \
    61 DefaultMap(const DefaultMap<MapRegistry, TT>& copy) \
    61 DefaultMap(const DefaultMap<MapRegistry, TT>& copy) \
    62   : { \
    62   : Parent(*copy.getGraph()) { \
    63   Parent::MapBase::operator= \
       
    64     (static_cast<const typename Parent::MapBase&>(copy)); \
       
    65   if (Parent::getGraph()) { \
    63   if (Parent::getGraph()) { \
    66     for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
    64     for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
    67       Parent::add(it); \
       
    68       Parent::operator[](it) = copy[it]; \
    65       Parent::operator[](it) = copy[it]; \
    69     } \
    66     } \
    70   } \
    67   } \
    71 } \
    68 } \
    72 DefaultMap& operator=(const DefaultMap& copy) { \
    69 DefaultMap& operator=(const DefaultMap& copy) { \