ManaPlus
Macros
foreach.h File Reference

(642df39)

Go to the source code of this file.

Macros

#define FOR_EACH(type, iter, array)
 
#define FOR_EACHR(type, iter, array)
 
#define FOR_EACHP(type, iter, array)
 
#define FOR_EACH_SAFE(type, iter, array)
 

Macro Definition Documentation

◆ FOR_EACH

#define FOR_EACH (   type,
  iter,
  array 
)
Value:
for (type iter = array.begin(), \
iter##_fend = array.end(); iter != iter##_fend; ++ iter)

Definition at line 24 of file foreach.h.

◆ FOR_EACH_SAFE

#define FOR_EACH_SAFE (   type,
  iter,
  array 
)
Value:
for (type iter = array.begin(); \
iter != array.end(); ++ iter)

Definition at line 33 of file foreach.h.

◆ FOR_EACHP

#define FOR_EACHP (   type,
  iter,
  array 
)
Value:
for (type iter = array->begin(), \
iter##_fend = array->end(); iter != iter##_fend; ++ iter)

Definition at line 30 of file foreach.h.

◆ FOR_EACHR

#define FOR_EACHR (   type,
  iter,
  array 
)
Value:
for (type iter = array.rbegin(), \
iter##_fend = array.rend(); iter != iter##_fend; ++ iter)

Definition at line 27 of file foreach.h.