Cleanup: fix various warnings after recent commit

This commit is contained in:
Jacques Lucke 2022-04-21 09:36:39 +02:00
parent 14f2d37ad1
commit 7a943428de
Notes: blender-bot 2023-07-12 09:46:06 +02:00
Referenced by pull request #109971, Fix #109822: Average Brush in Vertex Paint Mode is broken
Referenced by issue #109822, Regression: Average Brush in Vertex Paint Mode is broken
Referenced by commit ac3f4e959f, Fix #109822: Average Brush in Vertex Paint Mode is broken
2 changed files with 3 additions and 26 deletions

View File

@ -5,7 +5,7 @@
* \ingroup blenlib
*
* Contains color mixing utilities.
*
*
*/
#include "BLI_color.hh"
@ -831,7 +831,7 @@ static Color mix_vividlight(Color col_src, Color col_dst, typename Traits::Blend
using Value = typename Traits::ValueType;
using Blend = typename Traits::BlendType;
Value *cp_src, *cp_dst, *cp_mix;
Value *cp_src, *cp_dst;
Blend mfac;
Color col_mix(0, 0, 0, 0);
@ -843,7 +843,6 @@ static Color mix_vividlight(Color col_src, Color col_dst, typename Traits::Blend
cp_src = (Value *)&col_src;
cp_dst = (Value *)&col_dst;
cp_mix = (Value *)&col_mix;
const Blend cmp = Traits::range / 2;

View File

@ -78,12 +78,6 @@ using namespace blender::color;
/** \name Internal Utilities
* \{ */
static ColorPaint4b uint2color(uint c)
{
uchar *rgba = (uchar *)&c;
return ColorPaint4b(rgba[0], rgba[1], rgba[2], rgba[3]);
}
static uint color2uint(ColorPaint4b c)
{
return *(reinterpret_cast<uint *>(&c));
@ -2994,7 +2988,6 @@ static void do_vpaint_brush_blur_loops(bContext *C,
int totnode,
Color *lcol)
{
using Value = typename Traits::ValueType;
using Blend = typename Traits::BlendType;
SculptSession *ss = ob->sculpt;
@ -3137,7 +3130,6 @@ static void do_vpaint_brush_blur_verts(bContext *C,
int totnode,
Color *lcol)
{
using Value = typename Traits::ValueType;
using Blend = typename Traits::BlendType;
SculptSession *ss = ob->sculpt;
@ -3283,9 +3275,6 @@ static void do_vpaint_brush_smear(bContext *C,
int totnode,
Color *lcol)
{
using Value = typename Traits::ValueType;
using Blend = typename Traits::BlendType;
SculptSession *ss = ob->sculpt;
const struct SculptVertexPaintGeomMap *gmap = &ss->mode.vpaint.gmap;
@ -3465,7 +3454,6 @@ static void calculate_average_color(VPaintData<Color, Traits, domain> *vpd,
int totnode)
{
using Blend = typename Traits::BlendType;
using Value = typename Traits::ValueType;
struct VPaintAverageAccum<Blend> *accum = (VPaintAverageAccum<Blend> *)MEM_mallocN(
sizeof(*accum) * totnode, __func__);
@ -3552,8 +3540,6 @@ static float paint_and_tex_color_alpha(VPaint *vp,
const float v_co[3],
Color *r_color)
{
using Value = typename Traits::ValueType;
ColorPaint4f rgba;
ColorPaint4f rgba_br = toFloat(*r_color);
@ -3577,8 +3563,6 @@ static void vpaint_do_draw(bContext *C,
int totnode,
Color *lcol)
{
using Value = typename Traits::ValueType;
SculptSession *ss = ob->sculpt;
const PBVHType pbvh_type = BKE_pbvh_type(ss->pbvh);
@ -3748,6 +3732,7 @@ static void vpaint_paint_leaves(bContext *C,
switch ((eBrushVertexPaintTool)brush->vertexpaint_tool) {
case VPAINT_TOOL_AVERAGE:
calculate_average_color<Color, Traits, domain>(vpd, ob, me, brush, lcol, nodes, totnode);
break;
case VPAINT_TOOL_DRAW:
vpaint_do_draw<Color, Traits, domain>(C, sd, vp, vpd, ob, me, nodes, totnode, lcol);
break;
@ -3971,13 +3956,6 @@ static void vpaint_free_vpaintdata(Object *UNUSED(ob), void *_vpd)
MEM_delete<VPaintData<Color, Traits, domain>>(vpd);
}
static ViewContext *vpaint_get_viewcontext(Object *UNUSED(ob), void *vpd_ptr)
{
VPaintDataBase *vpd = static_cast<VPaintDataBase *>(vpd_ptr);
return &vpd->vc;
}
static void vpaint_stroke_done(const bContext *C, struct PaintStroke *stroke)
{
void *vpd_ptr = paint_stroke_mode_data(stroke);