1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-28 10:38:45 +00:00
transmission/wx/foreach.h

25 lines
874 B
C
Raw Normal View History

#ifndef _Foreach_h_
#define _Foreach_h_
#define foreach(Type,var,itname) \
for (Type::iterator itname(var.begin()), \
itname##end(var.end()); itname!=itname##end; \
++itname)
#define foreach_const(Type,var,itname) \
for (Type::const_iterator itname(var.begin()), \
itname##end(var.end()); itname!=itname##end; \
++itname)
#define foreach_r(Type,var,itname) \
for (Type::reverse_iterator itname(var.rbegin()), \
itname##end(var.rend()); itname!=itname##end; \
++itname)
#define foreach_const_r(Type,var,itname) \
for (Type::const_reverse_iterator itname(var.rbegin()), \
itname##end(var.rend()); itname!=itname##end; \
++itname)
#endif