[Bf-blender-cvs] [38ebac86cc2] master: Cleanup: Use const argument for context

Hans Goudey noreply at git.blender.org
Wed Apr 28 23:58:50 CEST 2021


Commit: 38ebac86cc28e53d7640dcc8ce3bc4edbb8f2a1b
Author: Hans Goudey
Date:   Wed Apr 28 16:58:43 2021 -0500
Branches: master
https://developer.blender.org/rB38ebac86cc28e53d7640dcc8ce3bc4edbb8f2a1b

Cleanup: Use const argument for context

===================================================================

M	source/blender/editors/include/UI_interface.h
M	source/blender/editors/interface/interface_layout.c

===================================================================

diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index bab7054a905..338b12f7985 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -2405,9 +2405,12 @@ void uiItemS_ex(uiLayout *layout, float factor);
 void uiItemSpacer(uiLayout *layout);
 
 void uiItemPopoverPanel_ptr(
-    uiLayout *layout, struct bContext *C, struct PanelType *pt, const char *name, int icon);
-void uiItemPopoverPanel(
-    uiLayout *layout, struct bContext *C, const char *panel_type, const char *name, int icon);
+    uiLayout *layout, const struct bContext *C, struct PanelType *pt, const char *name, int icon);
+void uiItemPopoverPanel(uiLayout *layout,
+                        const struct bContext *C,
+                        const char *panel_type,
+                        const char *name,
+                        int icon);
 void uiItemPopoverPanelFromGroup(uiLayout *layout,
                                  struct bContext *C,
                                  int space_id,
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index cabd98902a6..8f2871ce18b 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -3038,7 +3038,7 @@ void uiItemDecoratorR(uiLayout *layout, PointerRNA *ptr, const char *propname, i
 
 /* popover */
 void uiItemPopoverPanel_ptr(
-    uiLayout *layout, bContext *C, PanelType *pt, const char *name, int icon)
+    uiLayout *layout, const bContext *C, PanelType *pt, const char *name, int icon)
 {
   if (!name) {
     name = CTX_IFACE_(pt->translation_context, pt->label);
@@ -3067,7 +3067,7 @@ void uiItemPopoverPanel_ptr(
 }
 
 void uiItemPopoverPanel(
-    uiLayout *layout, bContext *C, const char *panel_type, const char *name, int icon)
+    uiLayout *layout, const bContext *C, const char *panel_type, const char *name, int icon)
 {
   PanelType *pt = WM_paneltype_find(panel_type, true);
   if (pt == NULL) {



More information about the Bf-blender-cvs mailing list