COIN-OR::LEMON - Graph Library

Changeset 345:d8c452d54d37 in lemon-0.x


Ignore:
Timestamp:
04/17/04 01:00:09 (20 years ago)
Author:
Mihaly Barasz
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@464
Message:

Misterious bug with StdMap::set (?)
Fixed default contstructor.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/include/maps.h

    r286 r345  
    7878
    7979
    80     StdMap() {}
     80    StdMap() : v() {}
    8181    /// Constructor with specified default value
    8282    StdMap(const T& _v) : v(_v) {}
     
    104104      return (*i).second;
    105105    }
    106     void set(const Key &k, const T &t) { parent::operator[](k)=t; }
     106    void set(const Key &k, const T &t) {
     107      // tyuha, ez valamiert segfault-olt igy:
     108      // parent::operator[](k) = t;
     109      (  *( (insert(PairType(k,t))).first )  ).second=t;
     110    }
    107111
    108112    /// Changes the default value of the map.
Note: See TracChangeset for help on using the changeset viewer.