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
path: root/source
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-04-21 10:36:39 +0300
committerJacques Lucke <jacques@blender.org>2022-04-21 10:36:39 +0300
commit7a943428de7b586ddc93b0d3a95cf9f4df7d1249 (patch)
tree1c81a0c7183140342c798d322f47d1ebbd18b7ae /source
parent14f2d37ad13d9c014de97b16ec5239106e9bab87 (diff)
Cleanup: fix various warnings after recent commit
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenlib/BLI_color_mix.hh5
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.cc24
2 files changed, 3 insertions, 26 deletions
diff --git a/source/blender/blenlib/BLI_color_mix.hh b/source/blender/blenlib/BLI_color_mix.hh
index 8398f2c3326..6b0c2d914dd 100644
--- a/source/blender/blenlib/BLI_color_mix.hh
+++ b/source/blender/blenlib/BLI_color_mix.hh
@@ -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;
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index 2d720e8e3c6..be0598919c7 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -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);