diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 09:32:25 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-15 13:42:06 +0300 |
commit | aa60b9338ab679853d36322829458ccb7b4f06d0 (patch) | |
tree | df1b32fcb9285d6c272415e8aac57110a5b9f265 /source/blender/editors/space_file | |
parent | b037816980dee7a74128c23eface983b9850d4a9 (diff) |
Cleanup: use 'const' style argument
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 116bd262d19..d7682a41570 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -170,7 +170,6 @@ static void file_draw_string(int sx, eFontStyle_Align align, const uchar col[4]) { - uiStyle *style; uiFontStyle fs; rcti rect; char fname[FILE_MAXFILE]; @@ -179,7 +178,7 @@ static void file_draw_string(int sx, return; } - style = UI_style_get(); + const uiStyle *style = UI_style_get(); fs = style->widgetlabel; BLI_strncpy(fname, string, FILE_MAXFILE); diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index ef7ecff5da7..d07db12eeac 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -639,7 +639,7 @@ FileAttributeColumnType file_attribute_column_type_find_isect(const View2D *v2d, float file_string_width(const char *str) { - uiStyle *style = UI_style_get(); + const uiStyle *style = UI_style_get(); float width; UI_fontstyle_set(&style->widget); @@ -661,12 +661,12 @@ float file_font_pointsize(void) #if 0 float s; char tmp[2] = "X"; - uiStyle *style = UI_style_get(); + const uiStyle *style = UI_style_get(); UI_fontstyle_set(&style->widget); s = BLF_height(style->widget.uifont_id, tmp); return style->widget.points; #else - uiStyle *style = UI_style_get(); + const uiStyle *style = UI_style_get(); UI_fontstyle_set(&style->widget); return style->widget.points * UI_DPI_FAC; #endif |