diff options
Diffstat (limited to 'source/blender/windowmanager/message_bus/intern')
-rw-r--r-- | source/blender/windowmanager/message_bus/intern/wm_message_bus.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/windowmanager/message_bus/intern/wm_message_bus.c b/source/blender/windowmanager/message_bus/intern/wm_message_bus.c index fd5237a70a5..86a106462c3 100644 --- a/source/blender/windowmanager/message_bus/intern/wm_message_bus.c +++ b/source/blender/windowmanager/message_bus/intern/wm_message_bus.c @@ -111,7 +111,7 @@ void WM_msgbus_clear_by_owner(struct wmMsgBus *mbus, void *owner) void WM_msg_dump(struct wmMsgBus *mbus, const char *info_str) { printf(">>>> %s\n", info_str); - for (wmMsgSubscribeKey *key = mbus->messages.first; key; key = key->next) { + LISTBASE_FOREACH (wmMsgSubscribeKey *, key, &mbus->messages) { const wmMsg *msg = wm_msg_subscribe_value_msg_cast(key); const wmMsgTypeInfo *info = &wm_msg_types[msg->type]; info->repr(stdout, key); @@ -131,8 +131,8 @@ void WM_msgbus_handle(struct wmMsgBus *mbus, struct bContext *C) } // uint a = 0, b = 0; - for (wmMsgSubscribeKey *key = mbus->messages.first; key; key = key->next) { - for (wmMsgSubscribeValueLink *msg_lnk = key->values.first; msg_lnk; msg_lnk = msg_lnk->next) { + LISTBASE_FOREACH (wmMsgSubscribeKey *, key, &mbus->messages) { + LISTBASE_FOREACH (wmMsgSubscribeValueLink *, msg_lnk, &key->values) { if (msg_lnk->params.tag) { msg_lnk->params.notify(C, key, &msg_lnk->params); msg_lnk->params.tag = false; @@ -175,7 +175,7 @@ wmMsgSubscribeKey *WM_msg_subscribe_with_key(struct wmMsgBus *mbus, } else { key = *r_key; - for (wmMsgSubscribeValueLink *msg_lnk = key->values.first; msg_lnk; msg_lnk = msg_lnk->next) { + LISTBASE_FOREACH (wmMsgSubscribeValueLink *, msg_lnk, &key->values) { if ((msg_lnk->params.notify == msg_val_params->notify) && (msg_lnk->params.owner == msg_val_params->owner) && (msg_lnk->params.user_data == msg_val_params->user_data)) { @@ -198,8 +198,7 @@ void WM_msg_publish_with_key(struct wmMsgBus *mbus, wmMsgSubscribeKey *msg_key) msg_key, BLI_listbase_count(&msg_key->values)); - for (wmMsgSubscribeValueLink *msg_lnk = msg_key->values.first; msg_lnk; - msg_lnk = msg_lnk->next) { + LISTBASE_FOREACH (wmMsgSubscribeValueLink *, msg_lnk, &msg_key->values) { if (false) { /* make an option? */ msg_lnk->params.notify(NULL, msg_key, &msg_lnk->params); } |