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_region_search.c
parent88ada5e218835f060a23cbe0f1f2da7452e81b07 (diff)
Cleanup: use const variables in interface code
Diffstat (limited to 'source/blender/editors/interface/interface_region_search.c')
-rw-r--r--source/blender/editors/interface/interface_region_search.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_region_search.c b/source/blender/editors/interface/interface_region_search.c
index adb2c1c802f..0711d953ebd 100644
--- a/source/blender/editors/interface/interface_region_search.c
+++ b/source/blender/editors/interface/interface_region_search.c
@@ -256,8 +256,8 @@ static void ui_searchbox_butrect(rcti *r_rect, uiSearchboxData *data, int itemnr
{
/* thumbnail preview */
if (data->preview) {
- int butw = (BLI_rcti_size_x(&data->bbox) - 2 * MENU_BORDER) / data->prv_cols;
- int buth = (BLI_rcti_size_y(&data->bbox) - 2 * MENU_BORDER) / data->prv_rows;
+ const int butw = (BLI_rcti_size_x(&data->bbox) - 2 * MENU_BORDER) / data->prv_cols;
+ const int buth = (BLI_rcti_size_y(&data->bbox) - 2 * MENU_BORDER) / data->prv_rows;
int row, col;
*r_rect = data->bbox;
@@ -273,7 +273,7 @@ static void ui_searchbox_butrect(rcti *r_rect, uiSearchboxData *data, int itemnr
}
/* list view */
else {
- int buth = (BLI_rcti_size_y(&data->bbox) - 2 * UI_POPUP_MENU_TOP) / SEARCH_ITEMS;
+ const int buth = (BLI_rcti_size_y(&data->bbox) - 2 * UI_POPUP_MENU_TOP) / SEARCH_ITEMS;
*r_rect = data->bbox;
r_rect->xmin = data->bbox.xmin + 3.0f;
@@ -701,7 +701,7 @@ ARegion *ui_searchbox_create_generic(bContext *C, ARegion *butregion, uiButSearc
static ARegionType type;
ARegion *region;
uiSearchboxData *data;
- float aspect = but->block->aspect;
+ const float aspect = but->block->aspect;
rctf rect_fl;
rcti rect_i;
const int margin = UI_POPUP_MARGIN;