Changeset 3f91792 for libcfa/src/bits/stack.hfa
- Timestamp:
- Dec 8, 2020, 1:01:05 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 8e58264
- Parents:
- 33a129a (diff), c9e0991 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
libcfa/src/bits/stack.hfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/stack.hfa
r33a129a r3f91792 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__30 #endif // __CFA_DEBUG__ 31 31 Next( &n ) = &head( s ) ? &head( s ) : &n; 32 32 root = &n; … … 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 48 Next( &t ) = 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.