[Bf-blender-cvs] [489cecb9548] master: Cleanup: change textview 'unsigned char' to 'uchar'

Campbell Barton noreply at git.blender.org
Fri Feb 14 04:06:50 CET 2020


Commit: 489cecb9548337e767dee3b1b1828e03835aa0b1
Author: Campbell Barton
Date:   Fri Feb 14 13:58:58 2020 +1100
Branches: master
https://developer.blender.org/rB489cecb9548337e767dee3b1b1828e03835aa0b1

Cleanup: change textview 'unsigned char' to 'uchar'

===================================================================

M	source/blender/editors/space_console/console_draw.c
M	source/blender/editors/space_info/info_draw.c
M	source/blender/editors/space_info/textview.c

===================================================================

diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c
index f8fa3f0128a..b669702c4f5 100644
--- a/source/blender/editors/space_console/console_draw.c
+++ b/source/blender/editors/space_console/console_draw.c
@@ -43,11 +43,11 @@
 #include "../space_info/textview.h"
 
 static int console_line_data(struct TextViewContext *tvc,
-                             unsigned char fg[4],
-                             unsigned char UNUSED(bg[4]),
+                             uchar fg[4],
+                             uchar UNUSED(bg[4]),
                              int *UNUSED(icon),
-                             unsigned char UNUSED(icon_fg[4]),
-                             unsigned char UNUSED(icon_bg[4]))
+                             uchar UNUSED(icon_fg[4]),
+                             uchar UNUSED(icon_bg[4]))
 {
   ConsoleLine *cl_iter = (ConsoleLine *)tvc->iter;
   int fg_id = TH_TEXT;
@@ -180,7 +180,7 @@ static void console_textview_draw_cursor(struct TextViewContext *tvc)
   immUnbindProgram();
 }
 
-static void console_textview_const_colors(TextViewContext *UNUSED(tvc), unsigned char bg_sel[4])
+static void console_textview_const_colors(TextViewContext *UNUSED(tvc), uchar bg_sel[4])
 {
   UI_GetThemeColor4ubv(TH_CONSOLE_SELECT, bg_sel);
 }
diff --git a/source/blender/editors/space_info/info_draw.c b/source/blender/editors/space_info/info_draw.c
index d0ff9495a74..1c56e17054b 100644
--- a/source/blender/editors/space_info/info_draw.c
+++ b/source/blender/editors/space_info/info_draw.c
@@ -43,11 +43,11 @@
 #include "GPU_framebuffer.h"
 
 static int report_line_data(struct TextViewContext *tvc,
-                            unsigned char fg[4],
-                            unsigned char bg[4],
+                            uchar fg[4],
+                            uchar bg[4],
                             int *icon,
-                            unsigned char icon_fg[4],
-                            unsigned char icon_bg[4])
+                            uchar icon_fg[4],
+                            uchar icon_bg[4])
 {
   Report *report = (Report *)tvc->iter;
 
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index aeec1e30e34..93283c349ec 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -79,7 +79,7 @@ static void console_draw_sel(const char *str,
                              const int xy[2],
                              const int str_len_draw,
                              TextViewDrawState *tds,
-                             const unsigned char bg_sel[4])
+                             const uchar bg_sel[4])
 {
   const int sel[2] = {tds->sel[0], tds->sel[1]};
   const int cwidth = tds->cwidth;
@@ -144,12 +144,12 @@ static int console_wrap_offsets(const char *str, int len, int width, int *lines,
 static bool console_draw_string(TextViewDrawState *tds,
                                 const char *str,
                                 int str_len,
-                                const unsigned char fg[4],
-                                const unsigned char bg[4],
+                                const uchar fg[4],
+                                const uchar bg[4],
                                 int icon,
-                                const unsigned char icon_fg[4],
-                                const unsigned char icon_bg[4],
-                                const unsigned char bg_sel[4])
+                                const uchar icon_fg[4],
+                                const uchar icon_bg[4],
+                                const uchar bg_sel[4])
 {
   int tot_lines; /* Total number of lines for wrapping. */
   int *offsets;  /* Offsets of line beginnings for wrapping. */
@@ -325,7 +325,7 @@ int textview_draw(TextViewContext *tvc,
   int xy[2];
   /* Disable selection by. */
   int sel[2] = {-1, -1};
-  unsigned char fg[4], bg[4], icon_fg[4], icon_bg[4];
+  uchar fg[4], bg[4], icon_fg[4], icon_bg[4];
   int icon = 0;
   const int font_id = blf_mono_font;
 
@@ -383,7 +383,7 @@ int textview_draw(TextViewContext *tvc,
   }
 
   if (tvc->begin(tvc)) {
-    unsigned char bg_sel[4] = {0};
+    uchar bg_sel[4] = {0};
 
     if (do_draw && tvc->const_colors) {
       tvc->const_colors(tvc, bg_sel);



More information about the Bf-blender-cvs mailing list