COIN-OR::LEMON - Graph Library

Changeset 381:b04e431907bc in lemon-1.2


Ignore:
Timestamp:
11/17/08 16:41:15 (16 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Message:

Avoid STL panic at Elevator when compiled with -D_GLIBCXX_DEBUG

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/elevator.h

    r380 r381  
    5858  private:
    5959
    60     typedef typename std::vector<Item>::iterator Vit;
     60    typedef Item *Vit;
    6161    typedef typename ItemSetTraits<Graph,Item>::template Map<Vit>::Type VitMap;
    6262    typedef typename ItemSetTraits<Graph,Item>::template Map<int>::Type IntMap;
     
    434434    {
    435435      _init_lev=0;
    436       _init_num=_items.begin();
    437       _first[0]=_items.begin();
    438       _last_active[0]=_items.begin()-1;
    439       Vit n=_items.begin();
     436      _init_num=&_items[0];
     437      _first[0]=&_items[0];
     438      _last_active[0]=&_items[0]-1;
     439      Vit n=&_items[0];
    440440      for(typename ItemSetTraits<Graph,Item>::ItemIt i(_g);i!=INVALID;++i)
    441441        {
     
    476476          _last_active[_init_lev]=_init_num-1;
    477477        }
    478       _first[_max_level+1]=_items.begin()+_item_num;
    479       _last_active[_max_level+1]=_items.begin()+_item_num-1;
     478      _first[_max_level+1]=&_items[0]+_item_num;
     479      _last_active[_max_level+1]=&_items[0]+_item_num-1;
    480480      _highest_active = -1;
    481481    }
Note: See TracChangeset for help on using the changeset viewer.