Changeset 6b33e89 for libcfa/src/bits/queue.hfa
- Timestamp:
- Apr 25, 2025, 7:39:09 AM (5 months ago)
- Branches:
- master
- Children:
- 65bd3c2
- Parents:
- b195498
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/bits/queue.hfa
rb195498 r6b33e89 24 24 Queue(T) & ?=?( const Queue(T) & ) = void; // no assignment 25 25 26 void ?{}( Queue(T) & q ) with( q ){26 void ?{}( Queue(T) & q ) { 27 27 ((Collection &)q){}; 28 last = 0p;28 q.last = 0p; 29 29 } // post: empty() 30 30 31 T & tail( Queue(T) & q ) with( q ){32 return * last;31 T & tail( Queue(T) & q ) { 32 return *q.last; 33 33 } 34 34 … … 46 46 if ( listed( &n ) ) abort( "(Queue &)%p.addHead( %p ) : Node is already on another list.", &q, &n ); 47 47 #endif // __CFA_DEBUG__ 48 if ( last ) {48 if ( q.last ) { 49 49 Next( &n ) = &head( q ); 50 50 q.root = &n; … … 60 60 if ( listed( &n ) ) abort( "(Queue &)%p.addTail( %p ) : Node is already on another list.", &q, &n ); 61 61 #endif // __CFA_DEBUG__ 62 if ( last ) Next( last ) = &n;62 if ( q.last ) Next( last ) = &n; 63 63 else root = &n; 64 64 last = &n;
Note:
See TracChangeset
for help on using the changeset viewer.