Changes in libcfa/src/bits/stack.hfa [19de7864:a3a76ea]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/stack.hfa
r19de7864 ra3a76ea 25 25 } 26 26 27 voidaddHead( Stack(T) & s, T & n ) with( s ) {27 T & addHead( Stack(T) & s, T & n ) with( s ) { 28 28 #ifdef __CFA_DEBUG__ 29 29 if ( listed( (Colable &)(n) ) ) abort( "(Stack &)%p.addHead( %p ) : Node is already on another list.", &s, n ); … … 31 31 Next( &n ) = &head( s ) ? &head( s ) : &n; 32 32 root = &n; 33 return n; 33 34 } 34 35 35 voidadd( Stack(T) & s, T & n ) with( s ) {36 addHead( s, n );36 T & add( Stack(T) & s, T & n ) with( s ) { 37 return addHead( s, n ); 37 38 } 38 39 39 voidpush( Stack(T) & s, T & n ) with( s ) {40 addHead( s, n );40 T & push( Stack(T) & s, T & n ) with( s ) { 41 return addHead( s, n ); 41 42 } 42 43
Note: See TracChangeset
for help on using the changeset viewer.