src/cx/iterator.h

changeset 516
7bcea73303ce
parent 500
eb9e7bd40a8e
child 551
2946e13c89a4
     1.1 --- a/src/cx/iterator.h	Sat Apr 16 14:47:27 2022 +0200
     1.2 +++ b/src/cx/iterator.h	Sat Apr 16 17:28:36 2022 +0200
     1.3 @@ -138,6 +138,6 @@
     1.4   * @param iter the iterator
     1.5   */
     1.6  #define cx_foreach(type, elem, iter) \
     1.7 -for (type elem; cxIteratorValid(&iter) && (elem = cxIteratorCurrent(&iter)) != NULL ; cxIteratorNext(&iter)) // NOLINT(bugprone-macro-parentheses)
     1.8 +for (type elem; cxIteratorValid(&iter) && (elem = (type)cxIteratorCurrent(&iter)) != NULL ; cxIteratorNext(&iter)) // NOLINT(bugprone-macro-parentheses)
     1.9  
    1.10  #endif /* UCX_ITERATOR_H */

mercurial