Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-12-04 22:50:53 +0300
committerHans Goudey <h.goudey@me.com>2020-12-04 22:50:53 +0300
commit67faa85fb05defa5c596ac6549deb52a3654c3a7 (patch)
treebd8223b34c7873aeee6b253301178627115380d3 /source/blender/windowmanager/intern/wm_operator_type.c
parent3daf28388b7372208cbec870f51b37be3aeac1e9 (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.c4
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);