src/cx/iterator.h

changeset 497
b182a8b8a1af
parent 496
1a07e24801a9
child 500
eb9e7bd40a8e
equal deleted inserted replaced
496:1a07e24801a9 497:b182a8b8a1af
136 * @param type the type of the elements 136 * @param type the type of the elements
137 * @param elem the name of the iteration variable 137 * @param elem the name of the iteration variable
138 * @param iter the iterator 138 * @param iter the iterator
139 */ 139 */
140 #define cx_foreach(type, elem, iter) \ 140 #define cx_foreach(type, elem, iter) \
141 for (type *elem; cxIteratorValid(&iter) && (elem = cxIteratorCurrent(&iter)) != NULL ; cxIteratorNext(&iter)) // NOLINT(bugprone-macro-parentheses) 141 for (type elem; cxIteratorValid(&iter) && (elem = cxIteratorCurrent(&iter)) != NULL ; cxIteratorNext(&iter)) // NOLINT(bugprone-macro-parentheses)
142 142
143 #endif /* UCX_ITERATOR_H */ 143 #endif /* UCX_ITERATOR_H */

mercurial