[Bf-blender-cvs] [ba718c15136] master: Cleanup: Improve function and variable name
Hans Goudey
noreply at git.blender.org
Wed Oct 21 15:38:33 CEST 2020
Commit: ba718c1513607987fff8255906ab36aa88d3919c
Author: Hans Goudey
Date: Wed Oct 21 08:38:26 2020 -0500
Branches: master
https://developer.blender.org/rBba718c1513607987fff8255906ab36aa88d3919c
Cleanup: Improve function and variable name
"pt" is unecessarily cryptic, and the funciton name wasn't very clear.
===================================================================
M source/blender/makesrna/intern/rna_ui.c
===================================================================
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,
More information about the Bf-blender-cvs
mailing list