Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lists.hpp

    r46d958 rd3347e  
    134134};
    135135
    136 /** Returns the first marker in a chain list.
    137  * \param *me one arbitrary item in chain list
    138  * \return poiner to first marker
    139  */
    140 template <typename X> X *GetFirst(X *me)
    141 {
    142   X *Binder = me;
    143   while(Binder->previous != 0)
    144     Binder = Binder->previous;
    145   return Binder;
    146 };
    147 
    148 /** Returns the last marker in a chain list.
    149  * \param *me one arbitrary item in chain list
    150  * \return poiner to last marker
    151  */
    152 template <typename X> X *GetLast(X *me)
    153 {
    154   X *Binder = me;
    155   while(Binder->next != 0)
    156     Binder = Binder->next;
    157   return Binder;
    158 };
    159 
    160136#endif /* LISTS_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.