Changes in libcfa/src/bits/stack.hfa [a5a67ab8:7d4ce2a]
- File:
-
- 1 edited
-
libcfa/src/bits/stack.hfa (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/stack.hfa
ra5a67ab8 r7d4ce2a 1 1 #pragma once 2 2 3 #include " collection.hfa"3 #include "bits/collection.hfa" 4 4 5 5 forall( dtype T ) { … … 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.