diff options
author | Hans Goudey <h.goudey@me.com> | 2020-08-19 04:46:29 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2020-08-19 04:47:00 +0300 |
commit | 349eebd7d1459fa2525850751040963899ef7535 (patch) | |
tree | eb1db9c00555f8827fa3bd49afb744a1ada1ea6d /source/blender/editors/interface/interface_widgets.c | |
parent | ffa8e7579916609b4ddd4dda031cf2a3a7eaefb1 (diff) |
UI Code Quality: Use LISTBASE_FOREACH in interface directory
I only skipped a few loops in the monstrous ui_handle_menu_event
function. Also, I only changed variable names where necessary to
prevent redeclarations.
Differential Revision: https://developer.blender.org/D8586
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 5410eed9915..c1801290152 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -29,6 +29,7 @@ #include "DNA_brush_types.h" #include "DNA_userdef_types.h" +#include "BLI_listbase.h" #include "BLI_math.h" #include "BLI_rect.h" #include "BLI_string.h" @@ -2242,7 +2243,7 @@ static void widget_draw_extra_icons(const uiWidgetColors *wcol, float alpha) { /* inverse order, from right to left. */ - for (uiButExtraOpIcon *op_icon = but->extra_op_icons.last; op_icon; op_icon = op_icon->prev) { + LISTBASE_FOREACH_BACKWARD (uiButExtraOpIcon *, op_icon, &but->extra_op_icons) { rcti temp = *rect; temp.xmin = temp.xmax - (BLI_rcti_size_y(rect) * 1.08f); |