src/hugo/default_map.h
changeset 919 6153d9cf78c6
parent 909 6a22e0dfd453
equal deleted inserted replaced
5:5a314dc16ff7 6:239670468ce6
    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   : Parent(*copy.getGraph()) { \
    62   : { \
       
    63   Parent::MapBase::operator= \
       
    64     (static_cast<const typename Parent::MapBase&>(copy)); \
    63   if (Parent::getGraph()) { \
    65   if (Parent::getGraph()) { \
    64     for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
    66     for (typename Parent::KeyIt it(*Parent::getGraph()); it!=INVALID; ++it) {\
       
    67       Parent::add(it); \
    65       Parent::operator[](it) = copy[it]; \
    68       Parent::operator[](it) = copy[it]; \
    66     } \
    69     } \
    67   } \
    70   } \
    68 } \
    71 } \
    69 DefaultMap& operator=(const DefaultMap& copy) { \
    72 DefaultMap& operator=(const DefaultMap& copy) { \