Commit 015b6aeb authored by twanvl's avatar twanvl

fixed: break now works from FOR_EACH

parent 767b8611
...@@ -132,8 +132,8 @@ ...@@ -132,8 +132,8 @@
*/ */
#define FOR_EACH_T(TypeIt,TypeElem,Elem,Collection, begin, end) \ #define FOR_EACH_T(TypeIt,TypeElem,Elem,Collection, begin, end) \
for(std::pair<TypeIt,bool> Elem##_IT(Collection.begin(), true) ; \ for(std::pair<TypeIt,bool> Elem##_IT(Collection.begin(), true) ; \
Elem##_IT.first != Collection.end() ; \ Elem##_IT.second && Elem##_IT.first != Collection.end() ; \
++Elem##_IT.first, Elem##_IT.second = true) \ ++Elem##_IT.first, Elem##_IT.second = !Elem##_IT.second) \
for(TypeElem Elem = *Elem##_IT.first ; \ for(TypeElem Elem = *Elem##_IT.first ; \
Elem##_IT.second ; \ Elem##_IT.second ; \
Elem##_IT.second = false) Elem##_IT.second = false)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment