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_template_search_menu.c
parent88ada5e218835f060a23cbe0f1f2da7452e81b07 (diff)
Cleanup: use const variables in interface code
Diffstat (limited to 'source/blender/editors/interface/interface_template_search_menu.c')
-rw-r--r--source/blender/editors/interface/interface_template_search_menu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_template_search_menu.c b/source/blender/editors/interface/interface_template_search_menu.c
index 0708714c659..d148ff70751 100644
--- a/source/blender/editors/interface/interface_template_search_menu.c
+++ b/source/blender/editors/interface/interface_template_search_menu.c
@@ -535,7 +535,7 @@ static struct MenuSearch_Data *menu_items_from_ui_create(
RNA_pointer_create(&screen->id, &RNA_Area, area, &ptr);
const int space_type_ui = RNA_property_enum_get(&ptr, prop_ui_type);
- int space_type_ui_index = RNA_enum_from_value(space_type_ui_items, space_type_ui);
+ const int space_type_ui_index = RNA_enum_from_value(space_type_ui_items, space_type_ui);
if (space_type_ui_index == -1) {
continue;
}
@@ -952,7 +952,7 @@ static void menu_search_exec_fn(bContext *C, void *UNUSED(arg1), void *arg2)
case MENU_SEARCH_TYPE_RNA: {
PointerRNA *ptr = &item->rna.ptr;
PropertyRNA *prop = item->rna.prop;
- int index = item->rna.index;
+ const int index = item->rna.index;
const int prop_type = RNA_property_type(prop);
bool changed = false;
@@ -1131,7 +1131,7 @@ void UI_but_func_menu_search(uiBut *but)
ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
/* When run from top-bar scan all areas in the current window. */
- bool include_all_areas = (area && (area->spacetype == SPACE_TOPBAR));
+ const bool include_all_areas = (area && (area->spacetype == SPACE_TOPBAR));
struct MenuSearch_Data *data = menu_items_from_ui_create(
C, win, area, region, include_all_areas);
UI_but_func_search_set(but,