From 4bccbceb34ef43cc6f0dd71e7f608d683a448e27 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 13 Apr 2023 13:13:56 +1000 Subject: [PATCH] Cleanup: quiet GCC warnings --- source/blender/blenkernel/BKE_paint.h | 1 + source/blender/blenkernel/intern/brush.cc | 6 +++++- source/blender/blenkernel/intern/paint.cc | 2 +- source/blender/editors/sculpt_paint/sculpt_paint_color.cc | 1 - 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 1060336fb6b..ac4f0532315 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -48,6 +48,7 @@ struct PaintCurve; struct PaintModeSettings; struct Palette; struct PaletteColor; +struct RegionView3D; struct Scene; struct StrokeCache; struct Sculpt; diff --git a/source/blender/blenkernel/intern/brush.cc b/source/blender/blenkernel/intern/brush.cc index 836b2cb3b46..eb783ed4abc 100644 --- a/source/blender/blenkernel/intern/brush.cc +++ b/source/blender/blenkernel/intern/brush.cc @@ -2580,7 +2580,7 @@ struct ImBuf *BKE_brush_gen_radial_control_imbuf(Brush *br, bool secondary, bool bool BKE_brush_has_cube_tip(const Brush *brush, ePaintMode paint_mode) { switch (paint_mode) { - case PAINT_MODE_SCULPT: + case PAINT_MODE_SCULPT: { if (brush->sculpt_tool == SCULPT_TOOL_MULTIPLANE_SCRAPE) { return true; } @@ -2591,6 +2591,10 @@ bool BKE_brush_has_cube_tip(const Brush *brush, ePaintMode paint_mode) } break; + } + default: { + break; + } } return false; diff --git a/source/blender/blenkernel/intern/paint.cc b/source/blender/blenkernel/intern/paint.cc index b6b10139261..b306c86f352 100644 --- a/source/blender/blenkernel/intern/paint.cc +++ b/source/blender/blenkernel/intern/paint.cc @@ -1317,7 +1317,7 @@ static bool paint_rake_rotation_active(const MTex &mtex) return mtex.tex && mtex.brush_angle_mode & MTEX_ANGLE_RAKE; } -const bool paint_rake_rotation_active(const Brush &brush, ePaintMode paint_mode) +static const bool paint_rake_rotation_active(const Brush &brush, ePaintMode paint_mode) { return paint_rake_rotation_active(brush.mtex) || paint_rake_rotation_active(brush.mask_mtex) || BKE_brush_has_cube_tip(&brush, paint_mode); diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_color.cc b/source/blender/editors/sculpt_paint/sculpt_paint_color.cc index 46721228b5e..037d40fc9e8 100644 --- a/source/blender/editors/sculpt_paint/sculpt_paint_color.cc +++ b/source/blender/editors/sculpt_paint/sculpt_paint_color.cc @@ -278,7 +278,6 @@ void SCULPT_do_paint_brush(PaintModeSettings *paint_mode_settings, BKE_curvemapping_init(brush->curve); - float area_no[3]; float mat[4][4]; /* If the brush is round the tip does not need to be aligned to the surface, so this saves a