COIN-OR::LEMON - Graph Library

Ticket #95: named_parameter_bug_fix.patch

File named_parameter_bug_fix.patch, 1.8 KB (added by Balazs Dezso, 16 years ago)
  • lemon/bfs.h

    # HG changeset patch
    # User Balazs Dezso <deba@inf.elte.hu>
    # Date 1211727671 -7200
    # Node ID 500f3cbff9e4ad090ac07241a7e885f70d82d9ab
    # Parent  2ccc1afc2c5235526c8b5adcb494f1f8e659cdaa
    Wrong member variable settings bug fix. (Ticket #95)
    
    diff -r 2ccc1afc2c52 -r 500f3cbff9e4 lemon/bfs.h
    a b  
    10161016    template<class T>
    10171017    BfsWizard<DefReachedMapBase<T> > reachedMap(const T &t)
    10181018    {
    1019       Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
     1019      Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t));
    10201020      return BfsWizard<DefReachedMapBase<T> >(*this);
    10211021    }
    10221022   
     
    10371037    template<class T>
    10381038    BfsWizard<DefProcessedMapBase<T> > processedMap(const T &t)
    10391039    {
    1040       Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
     1040      Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
    10411041      return BfsWizard<DefProcessedMapBase<T> >(*this);
    10421042    }
    10431043   
  • lemon/dfs.h

    diff -r 2ccc1afc2c52 -r 500f3cbff9e4 lemon/dfs.h
    a b  
    999999    template<class T>
    10001000    DfsWizard<DefReachedMapBase<T> > reachedMap(const T &t)
    10011001    {
    1002       Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
     1002      Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t));
    10031003      return DfsWizard<DefReachedMapBase<T> >(*this);
    10041004    }
    10051005   
     
    10201020    template<class T>
    10211021    DfsWizard<DefProcessedMapBase<T> > processedMap(const T &t)
    10221022    {
    1023       Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
     1023      Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
    10241024      return DfsWizard<DefProcessedMapBase<T> >(*this);
    10251025    }
    10261026