[Bf-blender-cvs] [460d944] master: Cleanup rna_Brush_direction_itemf()
Bastien Montagne
noreply at git.blender.org
Mon May 16 15:58:59 CEST 2016
Commit: 460d94449348647b20fb0d69f60ecc0e6cc36370
Author: Bastien Montagne
Date: Mon May 16 15:54:18 2016 +0200
Branches: master
https://developer.blender.org/rB460d94449348647b20fb0d69f60ecc0e6cc36370
Cleanup rna_Brush_direction_itemf()
Some variants of gcc compilation were reporting 'control reaching end of non-void function' error
in this switch/case maze. Either use break everywhere or not at all (which is simpler, since we
only always return anyway...).
===================================================================
M source/blender/makesrna/intern/rna_brush.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index e13919d..ac348c1 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -530,10 +530,12 @@ static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr,
switch ((BrushMaskTool)me->mask_tool) {
case BRUSH_MASK_DRAW:
return prop_direction_items;
- break;
+
case BRUSH_MASK_SMOOTH:
return prop_default_items;
- break;
+
+ default:
+ return prop_default_items;
}
case SCULPT_TOOL_FLATTEN:
@@ -554,7 +556,6 @@ static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr,
default:
return prop_default_items;
}
- break;
case ePaintTexture2D:
case ePaintTextureProjective:
@@ -565,7 +566,6 @@ static EnumPropertyItem *rna_Brush_direction_itemf(bContext *C, PointerRNA *ptr,
default:
return prop_default_items;
}
- break;
default:
return prop_default_items;
More information about the Bf-blender-cvs
mailing list