Changes in libcfa/src/bits/stack.hfa [7c1144b:a5a67ab8]
- File:
-
- 1 edited
-
libcfa/src/bits/stack.hfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/stack.hfa
r7c1144b ra5a67ab8 26 26 27 27 void addHead( Stack(T) & s, T & n ) with( s ) { 28 #ifdef __CFA_DEBUG__28 #ifdef __CFA_DEBUG__ 29 29 if ( listed( (Colable &)(n) ) ) abort( "(Stack &)%p.addHead( %p ) : Node is already on another list.", &s, n ); 30 #endif // __CFA_DEBUG__31 Next( n ) = &head( s ) ? &head( s ) : &n;30 #endif // __CFA_DEBUG__ 31 Next( &n ) = &head( s ) ? &head( s ) : &n; 32 32 root = &n; 33 33 } … … 44 44 T & t = head( s ); 45 45 if ( root ) { 46 root = ( T *)Next( *root);46 root = ( T *)Next(root); 47 47 if ( &head( s ) == &t ) root = 0p; // only one element ? 48 Next( t ) = 0p;48 Next( &t ) = 0p; 49 49 } // if 50 50 return t; … … 85 85 if ( curr ) { 86 86 &tp = Curr( si ); 87 T * n = Next( *Curr( si ) );87 T * n = Next( Curr( si ) ); 88 88 curr = n == Curr( si ) ? 0p : n; 89 89 } else &tp = 0p; … … 92 92 } // distribution 93 93 } // distribution 94 95 // Local Variables: // 96 // compile-command: "make install" // 97 // End: //
Note:
See TracChangeset
for help on using the changeset viewer.