diff options
author | Hans Goudey <h.goudey@me.com> | 2020-12-04 22:50:53 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-12-04 22:50:53 +0300 |
commit | 67faa85fb05defa5c596ac6549deb52a3654c3a7 (patch) | |
tree | bd8223b34c7873aeee6b253301178627115380d3 /source/blender/windowmanager/intern/wm_operator_type.c | |
parent | 3daf28388b7372208cbec870f51b37be3aeac1e9 (diff) |
Cleanup: Use LISTBASE_FOREACH macro in windowmanager intern
Also decrease the scope of variables related to the loops.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operator_type.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_operator_type.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_operator_type.c b/source/blender/windowmanager/intern/wm_operator_type.c index 7621862708e..4c4fd2b1a8e 100644 --- a/source/blender/windowmanager/intern/wm_operator_type.c +++ b/source/blender/windowmanager/intern/wm_operator_type.c @@ -572,9 +572,7 @@ wmOperatorTypeMacro *WM_operatortype_macro_define(wmOperatorType *ot, const char static void wm_operatortype_free_macro(wmOperatorType *ot) { - wmOperatorTypeMacro *otmacro; - - for (otmacro = ot->macro.first; otmacro; otmacro = otmacro->next) { + LISTBASE_FOREACH (wmOperatorTypeMacro *, otmacro, &ot->macro) { if (otmacro->ptr) { WM_operator_properties_free(otmacro->ptr); MEM_freeN(otmacro->ptr); |