diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-26 03:11:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-26 03:31:44 +0300 |
commit | add48c007428419ca57a899331e79d934cb1799b (patch) | |
tree | c870c0a5718eaccafe4e5fc563984a7f419b0f25 /source/blender/editors/interface/interface_region_popup.c | |
parent | 88ada5e218835f060a23cbe0f1f2da7452e81b07 (diff) |
Cleanup: use const variables in interface code
Diffstat (limited to 'source/blender/editors/interface/interface_region_popup.c')
-rw-r--r-- | source/blender/editors/interface/interface_region_popup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_region_popup.c b/source/blender/editors/interface/interface_region_popup.c index 947bdca4f9e..5445b098e5b 100644 --- a/source/blender/editors/interface/interface_region_popup.c +++ b/source/blender/editors/interface/interface_region_popup.c @@ -565,8 +565,8 @@ uiBlock *ui_popup_block_refresh(bContext *C, wmWindow *window = CTX_wm_window(C); ARegion *region = handle->region; - uiBlockCreateFunc create_func = handle->popup_create_vars.create_func; - uiBlockHandleCreateFunc handle_create_func = handle->popup_create_vars.handle_create_func; + const uiBlockCreateFunc create_func = handle->popup_create_vars.create_func; + const uiBlockHandleCreateFunc handle_create_func = handle->popup_create_vars.handle_create_func; void *arg = handle->popup_create_vars.arg; uiBlock *block_old = region->uiblocks.first; @@ -638,7 +638,7 @@ uiBlock *ui_popup_block_refresh(bContext *C, } if (block->flag & UI_BLOCK_RADIAL) { - int win_width = UI_SCREEN_MARGIN; + const int win_width = UI_SCREEN_MARGIN; int winx, winy; int x_offset = 0, y_offset = 0; @@ -712,7 +712,7 @@ uiBlock *ui_popup_block_refresh(bContext *C, * the same height. */ if (handle->refresh && handle->prev_block_rect.ymax > block->rect.ymax) { if (block->bounds_type != UI_BLOCK_BOUNDS_POPUP_CENTER) { - float offset = handle->prev_block_rect.ymax - block->rect.ymax; + const float offset = handle->prev_block_rect.ymax - block->rect.ymax; UI_block_translate(block, 0, offset); block->rect.ymin = handle->prev_block_rect.ymin; } |