From 38ebac86cc28e53d7640dcc8ce3bc4edbb8f2a1b Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 28 Apr 2021 16:58:43 -0500 Subject: Cleanup: Use const argument for context --- source/blender/editors/include/UI_interface.h | 9 ++++++--- source/blender/editors/interface/interface_layout.c | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) 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) { -- cgit v1.2.3