Changes in src/libcfa/iterator.c [53a6c2a:4040425]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/iterator.c
r53a6c2a r4040425 10 10 // Created On : Wed May 27 17:56:53 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Jul 7 08:38:23 201713 // Update Count : 2 812 // Last Modified On : Wed Mar 2 18:08:11 2016 13 // Update Count : 27 14 14 // 15 15 … … 17 17 18 18 forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) ) 19 void for_each( iterator_type begin, iterator_type end, void (* 19 void for_each( iterator_type begin, iterator_type end, void (*func)( elt_type ) ) { 20 20 for ( iterator_type i = begin; i != end; ++i ) { 21 21 func( *i ); 22 } // for23 } // for_each22 } 23 } 24 24 25 25 forall( otype iterator_type, otype elt_type | iterator( iterator_type, elt_type ) ) 26 void for_each_reverse( iterator_type begin, iterator_type end, void (* 26 void for_each_reverse( iterator_type begin, iterator_type end, void (*func)( elt_type ) ) { 27 27 for ( iterator_type i = end; i != begin; ) { 28 28 --i; 29 29 func( *i ); 30 } // for31 } // for_each_reverse30 } 31 } 32 32 33 33 // Local Variables: //
Note:
See TracChangeset
for help on using the changeset viewer.