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:
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r--source/blender/editors/interface/interface_widgets.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 4b18898b17f..4d2bd186f56 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -921,7 +921,7 @@ static void widget_draw_icon(const uiBut *but, BIFIconID icon, float alpha, cons
static void ui_text_clip_give_prev_off(uiBut *but)
{
- char *prev_utf8 = BLI_str_find_prev_char_utf8(but->drawstr, but->drawstr + but->ofs);
+ const char *prev_utf8 = BLI_str_find_prev_char_utf8(but->drawstr, but->drawstr + but->ofs);
int bytes = but->drawstr + but->ofs - prev_utf8;
but->ofs -= bytes;
@@ -929,7 +929,7 @@ static void ui_text_clip_give_prev_off(uiBut *but)
static void ui_text_clip_give_next_off(uiBut *but)
{
- char *next_utf8 = BLI_str_find_next_char_utf8(but->drawstr + but->ofs, NULL);
+ const char *next_utf8 = BLI_str_find_next_char_utf8(but->drawstr + but->ofs, NULL);
int bytes = next_utf8 - (but->drawstr + but->ofs);
but->ofs += bytes;
@@ -1138,7 +1138,7 @@ static void ui_text_clip_right_label(uiFontStyle *fstyle, uiBut *but, const rcti
const int okwidth = max_ii(BLI_rcti_size_x(rect) - border, 0);
char *cpoin = NULL;
int drawstr_len = strlen(but->drawstr);
- char *cpend = but->drawstr + drawstr_len;
+ const char *cpend = but->drawstr + drawstr_len;
/* need to set this first */
uiStyleFontSet(fstyle);
@@ -1164,7 +1164,7 @@ static void ui_text_clip_right_label(uiFontStyle *fstyle, uiBut *but, const rcti
/* chop off the leading text, starting from the right */
while (but->strwidth > okwidth && cp2 > but->drawstr) {
- char *prev_utf8 = BLI_str_find_prev_char_utf8(but->drawstr, cp2);
+ const char *prev_utf8 = BLI_str_find_prev_char_utf8(but->drawstr, cp2);
int bytes = cp2 - prev_utf8;
/* shift the text after and including cp2 back by 1 char, +1 to include null terminator */
@@ -1325,7 +1325,7 @@ static void widget_draw_text(uiFontStyle *fstyle, uiWidgetColors *wcol, uiBut *b
if (but->menu_key != '\0') {
char fixedbuf[128];
- char *str;
+ const char *str;
BLI_strncpy(fixedbuf, drawstr + but->ofs, min_ii(sizeof(fixedbuf), drawstr_left_len));
@@ -2322,7 +2322,7 @@ static void ui_draw_but_HSVCUBE(uiBut *but, const rcti *rect)
{
float rgb[3];
float x = 0.0f, y = 0.0f;
- float *hsv = ui_block_hsv_get(but->block);
+ const float *hsv = ui_block_hsv_get(but->block);
float hsv_n[3];
bool use_display_colorspace = ui_color_picker_use_display_colorspace(but);