Cleanup: protect parameters of FOREACH_MAIN_ID
& co macros.
This commit is contained in:
@@ -165,9 +165,9 @@ struct GSet *BKE_main_gset_create(struct Main *bmain, struct GSet *gset);
|
||||
|
||||
#define FOREACH_MAIN_LISTBASE_ID_BEGIN(_lb, _id) \
|
||||
{ \
|
||||
ID *_id_next = _lb->first; \
|
||||
for (_id = _id_next; _id != NULL; _id = _id_next) { \
|
||||
_id_next = _id->next;
|
||||
ID *_id_next = (_lb)->first; \
|
||||
for ((_id) = _id_next; (_id) != NULL; (_id) = _id_next) { \
|
||||
_id_next = (_id)->next;
|
||||
|
||||
#define FOREACH_MAIN_LISTBASE_ID_END \
|
||||
} \
|
||||
@@ -177,9 +177,9 @@ struct GSet *BKE_main_gset_create(struct Main *bmain, struct GSet *gset);
|
||||
#define FOREACH_MAIN_LISTBASE_BEGIN(_bmain, _lb) \
|
||||
{ \
|
||||
ListBase *_lbarray[MAX_LIBARRAY]; \
|
||||
int _i = set_listbasepointers(_bmain, _lbarray); \
|
||||
int _i = set_listbasepointers((_bmain), _lbarray); \
|
||||
while (_i--) { \
|
||||
_lb = _lbarray[_i];
|
||||
(_lb) = _lbarray[_i];
|
||||
|
||||
#define FOREACH_MAIN_LISTBASE_END \
|
||||
} \
|
||||
@@ -193,8 +193,8 @@ struct GSet *BKE_main_gset_create(struct Main *bmain, struct GSet *gset);
|
||||
#define FOREACH_MAIN_ID_BEGIN(_bmain, _id) \
|
||||
{ \
|
||||
ListBase *_lb; \
|
||||
FOREACH_MAIN_LISTBASE_BEGIN (_bmain, _lb) { \
|
||||
FOREACH_MAIN_LISTBASE_ID_BEGIN (_lb, _id)
|
||||
FOREACH_MAIN_LISTBASE_BEGIN ((_bmain), _lb) { \
|
||||
FOREACH_MAIN_LISTBASE_ID_BEGIN (_lb, (_id))
|
||||
|
||||
#define FOREACH_MAIN_ID_END \
|
||||
FOREACH_MAIN_LISTBASE_ID_END; \
|
||||
|
Reference in New Issue
Block a user