[Bf-blender-cvs] [e59bd19] master: Cleanup: style & const's

Campbell Barton noreply at git.blender.org
Mon May 4 21:21:18 CEST 2015


Commit: e59bd19fa75e65b794e4c67bdcfb8d13867900f9
Author: Campbell Barton
Date:   Tue May 5 05:17:25 2015 +1000
Branches: master
https://developer.blender.org/rBe59bd19fa75e65b794e4c67bdcfb8d13867900f9

Cleanup: style & const's

===================================================================

M	intern/cycles/bvh/bvh_node.h
M	source/blender/bmesh/intern/bmesh_marking.c
M	source/blender/bmesh/tools/bmesh_triangulate.c
M	source/blender/editors/gpencil/gpencil_select.c
M	source/blender/editors/object/object_data_transfer.c
M	source/blender/editors/object/object_shapekey.c
M	source/blender/editors/screen/area.c
M	source/blender/editors/screen/screen_context.c
M	source/blender/editors/sculpt_paint/paint_stroke.c
M	source/blender/editors/space_sequencer/sequencer_scopes.c
M	source/blender/makesdna/DNA_packedFile_types.h

===================================================================

diff --git a/intern/cycles/bvh/bvh_node.h b/intern/cycles/bvh/bvh_node.h
index 1656bb3..44f5518 100644
--- a/intern/cycles/bvh/bvh_node.h
+++ b/intern/cycles/bvh/bvh_node.h
@@ -24,8 +24,7 @@
 
 CCL_NAMESPACE_BEGIN
 
-enum BVH_STAT
-{
+enum BVH_STAT {
 	BVH_STAT_NODE_COUNT,
 	BVH_STAT_INNER_COUNT,
 	BVH_STAT_LEAF_COUNT,
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index a735f39..93be42a 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -73,9 +73,9 @@ static void recount_totsels(BMesh *bm)
 /** \name BMesh helper functions for selection flushing.
  * \{ */
 
-static bool bm_vert_is_edge_select_any_other(BMVert *v, BMEdge *e_first)
+static bool bm_vert_is_edge_select_any_other(const BMVert *v, const BMEdge *e_first)
 {
-	BMEdge *e_iter = e_first;
+	const BMEdge *e_iter = e_first;
 
 	/* start by stepping over the current edge */
 	while ((e_iter = bmesh_disk_edge_next(e_iter, v)) != e_first) {
@@ -87,10 +87,10 @@ static bool bm_vert_is_edge_select_any_other(BMVert *v, BMEdge *e_first)
 }
 
 #if 0
-static bool bm_vert_is_edge_select_any(BMVert *v)
+static bool bm_vert_is_edge_select_any(const BMVert *v)
 {
 	if (v->e) {
-		BMEdge *e_iter, *e_first;
+		const BMEdge *e_iter, *e_first;
 		e_iter = e_first = v->e;
 		do {
 			if (BM_elem_flag_test(e_iter, BM_ELEM_SELECT)) {
@@ -104,7 +104,7 @@ static bool bm_vert_is_edge_select_any(BMVert *v)
 
 static bool bm_edge_is_face_select_any_other(BMLoop *l_first)
 {
-	BMLoop *l_iter = l_first;
+	const BMLoop *l_iter = l_first;
 
 	/* start by stepping over the current face */
 	while ((l_iter = l_iter->radial_next) != l_first) {
@@ -116,10 +116,10 @@ static bool bm_edge_is_face_select_any_other(BMLoop *l_first)
 }
 
 #if 0
-static bool bm_edge_is_face_select_any(BMEdge *e)
+static bool bm_edge_is_face_select_any(const BMEdge *e)
 {
 	if (e->l) {
-		BMLoop *l_iter, *l_first;
+		const BMLoop *l_iter, *l_first;
 		l_iter = l_first = e->l;
 		do {
 			if (BM_elem_flag_test(l_iter->f, BM_ELEM_SELECT)) {
diff --git a/source/blender/bmesh/tools/bmesh_triangulate.c b/source/blender/bmesh/tools/bmesh_triangulate.c
index 404776a..6f2aaf2 100644
--- a/source/blender/bmesh/tools/bmesh_triangulate.c
+++ b/source/blender/bmesh/tools/bmesh_triangulate.c
@@ -34,7 +34,6 @@
 #include "BLI_utildefines.h"
 #include "BLI_alloca.h"
 #include "BLI_memarena.h"
-#include "BLI_listbase.h"
 #include "BLI_heap.h"
 #include "BLI_edgehash.h"
 
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index 98bce30..9d0cb6d 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -40,7 +40,6 @@
 #include "BLI_utildefines.h"
 
 #include "DNA_gpencil_types.h"
-#include "DNA_scene_types.h"
 #include "DNA_screen_types.h"
 
 #include "BKE_context.h"
diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c
index a7802b6..b3b2299 100644
--- a/source/blender/editors/object/object_data_transfer.c
+++ b/source/blender/editors/object/object_data_transfer.c
@@ -29,8 +29,6 @@
  *  \ingroup edobj
  */
 
-#include "MEM_guardedalloc.h"
-
 #include "DNA_mesh_types.h"
 #include "DNA_modifier_types.h"
 #include "DNA_object_types.h"
@@ -59,7 +57,6 @@
 #include "ED_object.h"
 
 #include "UI_interface.h"
-#include "UI_resources.h"
 
 #include "object_intern.h"
 
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 674eb25..8f8bfc4 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -48,7 +48,6 @@
 #include "DNA_lattice_types.h"
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
-#include "DNA_scene_types.h"
 #include "DNA_object_types.h"
 
 #include "BKE_context.h"
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index a0ab8de..3a4034d 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -2069,7 +2069,7 @@ void ED_region_info_draw(ARegion *ar, const char *text, int block, float fill_co
 
 #define MAX_METADATA_STR    1024
 
-const char *meta_data_list[] =
+static const char *meta_data_list[] =
 {
 	"File",
 	"Strip",
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 3431ce9..fc4ee47 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -81,7 +81,6 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
 	ScrArea *sa = CTX_wm_area(C);
 	Scene *scene = sc->scene;
 	Base *base;
-	unsigned int lay = scene->lay;
 
 #if 0  /* Using the context breaks adding objects in the UI. Need to find out why - campbell */
 	Object *obact = CTX_data_active_object(C);
@@ -119,7 +118,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
 		int selectable_objects = CTX_data_equals(member, "selectable_objects");
 
 		for (base = scene->base.first; base; base = base->next) {
-			if (base->lay & lay) {
+			if (base->lay & scene->lay) {
 				if ((base->object->restrictflag & OB_RESTRICT_VIEW) == 0 && (base->object->restrictflag & OB_RESTRICT_SELECT) == 0) {
 					if (selectable_objects)
 						CTX_data_id_list_add(result, &base->object->id);
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index f0963ca..2ae5447 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -671,8 +671,7 @@ PaintStroke *paint_stroke_new(bContext *C,
 	get_imapaint_zoom(C, &zoomx, &zoomy);
 	stroke->zoom_2d = max_ff(zoomx, zoomy);
 
-	if (stroke->stroke_mode == BRUSH_STROKE_INVERT)
-	{
+	if (stroke->stroke_mode == BRUSH_STROKE_INVERT) {
 		if (br->flag & (BRUSH_CURVE)) {
 			RNA_enum_set(op->ptr, "mode", BRUSH_STROKE_NORMAL);
 		}
@@ -1137,8 +1136,7 @@ int paint_stroke_modal(bContext *C, wmOperator *op, const wmEvent *event)
 		copy_v2_fl2(mouse, event->mval[0], event->mval[1]);
 		paint_stroke_line_constrain(stroke, mouse);
 		
-		if (stroke->stroke_started && (first_modal || (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE))))
-		{
+		if (stroke->stroke_started && (first_modal || (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)))) {
 			if ((br->mtex.brush_angle_mode & MTEX_ANGLE_RAKE) || (br->mtex.brush_angle_mode & MTEX_ANGLE_RAKE)) {
 				copy_v2_v2(stroke->ups->last_rake, stroke->last_mouse_position);
 			}
diff --git a/source/blender/editors/space_sequencer/sequencer_scopes.c b/source/blender/editors/space_sequencer/sequencer_scopes.c
index 404671c..c197aab 100644
--- a/source/blender/editors/space_sequencer/sequencer_scopes.c
+++ b/source/blender/editors/space_sequencer/sequencer_scopes.c
@@ -29,7 +29,6 @@
 #include <math.h>
 #include <string.h>
 
-#include "BLI_math_color.h"
 #include "BLI_utildefines.h"
 
 #include "IMB_colormanagement.h"
diff --git a/source/blender/makesdna/DNA_packedFile_types.h b/source/blender/makesdna/DNA_packedFile_types.h
index ef0a0f6..56140c8 100644
--- a/source/blender/makesdna/DNA_packedFile_types.h
+++ b/source/blender/makesdna/DNA_packedFile_types.h
@@ -40,8 +40,7 @@ typedef struct PackedFile {
 	void *data;
 } PackedFile;
 
-enum PF_FileStatus
-{
+enum PF_FileStatus {
 	PF_EQUAL = 0,
 	PF_DIFFERS = 1,
 	PF_NOFILE = 2,




More information about the Bf-blender-cvs mailing list