Cleanup rna_Brush_direction_itemf()
authorBastien Montagne <montagne29@wanadoo.fr>
Mon, 16 May 2016 13:54:18 +0000 (15:54 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Mon, 16 May 2016 13:54:18 +0000 (15:54 +0200)
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...).

source/blender/makesrna/intern/rna_brush.c

index e13919dd1a132f6f4d7e29980b99d7267885151f..ac348c1750cc5ddb1abf9e5361033d7807f149e1 100644 (file)
@@ -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;