# HG changeset patch # User Mike Becker # Date 1650122916 -7200 # Node ID 7bcea73303ce43b118e06dc73433795a23c5a1b3 # Parent 6d3909bf1609aef59c54745d05106f94ee057375 fix required cast if compiled with C++ diff -r 6d3909bf1609 -r 7bcea73303ce src/cx/iterator.h --- a/src/cx/iterator.h Sat Apr 16 14:47:27 2022 +0200 +++ b/src/cx/iterator.h Sat Apr 16 17:28:36 2022 +0200 @@ -138,6 +138,6 @@ * @param iter the iterator */ #define cx_foreach(type, elem, iter) \ -for (type elem; cxIteratorValid(&iter) && (elem = cxIteratorCurrent(&iter)) != NULL ; cxIteratorNext(&iter)) // NOLINT(bugprone-macro-parentheses) +for (type elem; cxIteratorValid(&iter) && (elem = (type)cxIteratorCurrent(&iter)) != NULL ; cxIteratorNext(&iter)) // NOLINT(bugprone-macro-parentheses) #endif /* UCX_ITERATOR_H */