|
ManaPlus
|
Go to the documentation of this file.
22 #ifndef UTILS_FOREACH_H
23 #define UTILS_FOREACH_H
25 #define FOR_EACH(type, iter, array) for (type iter = array.begin(), \
26 iter##_fend = array.end(); iter != iter##_fend; ++ iter)
28 #define FOR_EACHR(type, iter, array) for (type iter = array.rbegin(), \
29 iter##_fend = array.rend(); iter != iter##_fend; ++ iter)
31 #define FOR_EACHP(type, iter, array) for (type iter = array->begin(), \
32 iter##_fend = array->end(); iter != iter##_fend; ++ iter)
34 #define FOR_EACH_SAFE(type, iter, array) for (type iter = array.begin(); \
35 iter != array.end(); ++ iter)