gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Avoid STL panic at Elevator when compiled with -D_GLIBCXX_DEBUG
0 1 0
default
1 file changed with 7 insertions and 7 deletions:
↑ Collapse diff ↑
Ignore white space 16 line context
... ...
@@ -52,17 +52,17 @@
52 52
  {
53 53
  public:
54 54

	
55 55
    typedef Item Key;
56 56
    typedef int Value;
57 57

	
58 58
  private:
59 59

	
60
    typedef typename std::vector<Item>::iterator Vit;
60
    typedef Item *Vit;
61 61
    typedef typename ItemSetTraits<Graph,Item>::template Map<Vit>::Type VitMap;
62 62
    typedef typename ItemSetTraits<Graph,Item>::template Map<int>::Type IntMap;
63 63

	
64 64
    const Graph &_g;
65 65
    int _max_level;
66 66
    int _item_num;
67 67
    VitMap _where;
68 68
    IntMap _level;
... ...
@@ -428,20 +428,20 @@
428 428
    ///The items not listed will be put on the highest level.
429 429
    ///@{
430 430

	
431 431
    ///Start the initialization process.
432 432

	
433 433
    void initStart()
434 434
    {
435 435
      _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];
440 440
      for(typename ItemSetTraits<Graph,Item>::ItemIt i(_g);i!=INVALID;++i)
441 441
        {
442 442
          *n=i;
443 443
          _where[i]=n;
444 444
          _level[i]=_max_level;
445 445
          ++n;
446 446
        }
447 447
    }
... ...
@@ -470,18 +470,18 @@
470 470

	
471 471
    void initFinish()
472 472
    {
473 473
      for(_init_lev++;_init_lev<=_max_level;_init_lev++)
474 474
        {
475 475
          _first[_init_lev]=_init_num;
476 476
          _last_active[_init_lev]=_init_num-1;
477 477
        }
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;
480 480
      _highest_active = -1;
481 481
    }
482 482

	
483 483
    ///@}
484 484

	
485 485
  };
486 486

	
487 487
  ///Class for handling "labels" in push-relabel type algorithms.
0 comments (0 inline)