Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-08-26 03:11:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-26 03:31:44 +0300
commitadd48c007428419ca57a899331e79d934cb1799b (patch)
treec870c0a5718eaccafe4e5fc563984a7f419b0f25 /source/blender/editors/interface/interface_context_menu.c
parent88ada5e218835f060a23cbe0f1f2da7452e81b07 (diff)
Cleanup: use const variables in interface code
Diffstat (limited to 'source/blender/editors/interface/interface_context_menu.c')
-rw-r--r--source/blender/editors/interface/interface_context_menu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_context_menu.c b/source/blender/editors/interface/interface_context_menu.c
index 59178e209db..9889c81ca55 100644
--- a/source/blender/editors/interface/interface_context_menu.c
+++ b/source/blender/editors/interface/interface_context_menu.c
@@ -91,7 +91,7 @@ static IDProperty *shortcut_property_from_rna(bContext *C, uiBut *but)
/* Create ID property of data path, to pass to the operator. */
IDProperty *prop;
- IDPropertyTemplate val = {0};
+ const IDPropertyTemplate val = {0};
prop = IDP_New(IDP_GROUP, &val, __func__);
IDP_AddToGroup(prop, IDP_NewString(final_data_path, "data_path", strlen(final_data_path) + 1));
@@ -517,7 +517,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
uiLayout *layout;
{
- uiStringInfo label = {BUT_GET_LABEL, NULL};
+ const uiStringInfo label = {BUT_GET_LABEL, NULL};
/* highly unlikely getting the label ever fails */
UI_but_string_info_get(C, but, &label, NULL);
@@ -548,9 +548,9 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
const PropertyType type = RNA_property_type(prop);
const PropertySubType subtype = RNA_property_subtype(prop);
bool is_anim = RNA_property_animateable(ptr, prop);
- bool is_editable = RNA_property_editable(ptr, prop);
- bool is_idprop = RNA_property_is_idprop(prop);
- bool is_set = RNA_property_is_set(ptr, prop);
+ const bool is_editable = RNA_property_editable(ptr, prop);
+ const bool is_idprop = RNA_property_is_idprop(prop);
+ const bool is_set = RNA_property_is_set(ptr, prop);
/* second slower test,
* saved people finding keyframe items in menus when its not possible */
@@ -1044,7 +1044,7 @@ bool ui_popup_context_menu_for_button(bContext *C, uiBut *but)
if (idname != NULL) {
uiBlock *block = uiLayoutGetBlock(layout);
uiBut *but2;
- int w = uiLayoutGetWidth(layout);
+ const int w = uiLayoutGetWidth(layout);
wmKeyMap *km;
/* We want to know if this op has a shortcut, be it hotkey or not. */