Fix warnings and remove casts by adding copy_vx_vx_uchar() functions.
[blender.git] / source / blender / render / intern / source / bake.c
index 0210bec5ab49338b8f64af21973f39a535d58f3e..30036c27b5d80dab2194639681f20303a2449618 100644 (file)
@@ -320,7 +320,7 @@ static void bake_shade(void *handle, Object *ob, ShadeInput *shi, int UNUSED(qua
                }
                else {
                        unsigned char *imcol = (unsigned char *)(bs->rect + bs->rectx * y + x);
-                       copy_v4_v4_char((char *)imcol, (char *)col);
+                       copy_v4_v4_uchar(imcol, col);
                }
 
        }
@@ -375,8 +375,8 @@ static void bake_displacement(void *handle, ShadeInput *UNUSED(shi), float dist,
                        bs->vcol->b = col[2];
                }
                else {
-                       char *imcol = (char *)(bs->rect + bs->rectx * y + x);
-                       copy_v4_v4_char(imcol, (char *)col);
+                       unsigned char *imcol = (unsigned char *)(bs->rect + bs->rectx * y + x);
+                       copy_v4_v4_uchar(imcol, col);
                }
        }
        if (bs->rect_mask) {