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 */ |