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_style.c | |
parent | 88ada5e218835f060a23cbe0f1f2da7452e81b07 (diff) |
Cleanup: use const variables in interface code
Diffstat (limited to 'source/blender/editors/interface/interface_style.c')
-rw-r--r-- | source/blender/editors/interface/interface_style.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index 28279996559..b38ad9f6adb 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -184,7 +184,7 @@ void UI_fontstyle_draw_ex(const uiFontStyle *fs, } else { /* draw from boundbox center */ - float height = BLF_ascender(fs->uifont_id) + BLF_descender(fs->uifont_id); + const float height = BLF_ascender(fs->uifont_id) + BLF_descender(fs->uifont_id); yofs = ceil(0.5f * (BLI_rcti_size_y(rect) - height)); } @@ -517,7 +517,8 @@ void uiStyleInit(void) /* Set default flags based on UI preferences (not render fonts) */ { - int flag_disable = (BLF_MONOCHROME | BLF_HINTING_NONE | BLF_HINTING_SLIGHT | BLF_HINTING_FULL); + const int flag_disable = (BLF_MONOCHROME | BLF_HINTING_NONE | BLF_HINTING_SLIGHT | + BLF_HINTING_FULL); int flag_enable = 0; if (U.text_render & USER_TEXT_HINTING_NONE) { |