src/cx/iterator.h

changeset 516
7bcea73303ce
parent 500
eb9e7bd40a8e
child 551
2946e13c89a4
equal deleted inserted replaced
515:6d3909bf1609 516:7bcea73303ce
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 = (type)cxIteratorCurrent(&iter)) != NULL ; cxIteratorNext(&iter)) // NOLINT(bugprone-macro-parentheses)
142 142
143 #endif /* UCX_ITERATOR_H */ 143 #endif /* UCX_ITERATOR_H */

mercurial