From ba718c1513607987fff8255906ab36aa88d3919c Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 21 Oct 2020 08:38:26 -0500 Subject: Cleanup: Improve function and variable name "pt" is unecessarily cryptic, and the funciton name wasn't very clear. --- source/blender/makesrna/intern/rna_ui.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c index 5179c4e538a..d87b3a6386e 100644 --- a/source/blender/makesrna/intern/rna_ui.c +++ b/source/blender/makesrna/intern/rna_ui.c @@ -180,14 +180,14 @@ static void panel_draw_header_preset(const bContext *C, Panel *panel) RNA_parameter_list_free(&list); } -static void remove_panel_type_recursive(Panel *panel, const PanelType *pt) +static void panel_type_clear_recursive(Panel *panel, const PanelType *type) { - if (panel->type == pt) { + if (panel->type == type) { panel->type = NULL; } LISTBASE_FOREACH (Panel *, child_panel, &panel->children) { - remove_panel_type_recursive(child_panel, pt); + panel_type_clear_recursive(child_panel, type); } } @@ -231,7 +231,7 @@ static void rna_Panel_unregister(Main *bmain, StructRNA *type) LISTBASE_FOREACH (ARegion *, region, regionbase) { if (region->type == art) { LISTBASE_FOREACH (Panel *, panel, ®ion->panels) { - remove_panel_type_recursive(panel, pt); + panel_type_clear_recursive(panel, pt); } } /* The unregistered panel might have had a template that added instanced panels, -- cgit v1.2.3