From aa60b9338ab679853d36322829458ccb7b4f06d0 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 15 Mar 2020 17:32:25 +1100 Subject: Cleanup: use 'const' style argument --- source/blender/editors/space_file/file_draw.c | 3 +-- source/blender/editors/space_file/filesel.c | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/space_file') 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 -- cgit v1.2.3