[Bf-blender-cvs] [23a76491ebb] master: Cleanup: style, use const args where possible

Campbell Barton noreply at git.blender.org
Sat Mar 23 02:19:19 CET 2019


Commit: 23a76491ebb94d1bb2139dd4a82fa4d5587ae548
Author: Campbell Barton
Date:   Sat Mar 23 12:16:38 2019 +1100
Branches: master
https://developer.blender.org/rB23a76491ebb94d1bb2139dd4a82fa4d5587ae548

Cleanup: style, use const args where possible

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

M	source/blender/bmesh/tools/bmesh_triangulate.c
M	source/blender/draw/modes/object_mode.c

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

diff --git a/source/blender/bmesh/tools/bmesh_triangulate.c b/source/blender/bmesh/tools/bmesh_triangulate.c
index 9be4e8f621c..3209732ba66 100644
--- a/source/blender/bmesh/tools/bmesh_triangulate.c
+++ b/source/blender/bmesh/tools/bmesh_triangulate.c
@@ -83,9 +83,9 @@ static void bm_face_triangulate_mapping(
 
 
 void BM_mesh_triangulate(
-	BMesh *bm, const int quad_method, const int ngon_method, const int min_vertices,
-	const bool tag_only, BMOperator *op, BMOpSlot *slot_facemap_out,
-	BMOpSlot *slot_facemap_double_out)
+        BMesh *bm, const int quad_method, const int ngon_method, const int min_vertices,
+        const bool tag_only, BMOperator *op, BMOpSlot *slot_facemap_out,
+        BMOpSlot *slot_facemap_double_out)
 {
 	BMIter iter;
 	BMFace *face;
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c
index 2e83a23ebae..05b6508e959 100644
--- a/source/blender/draw/modes/object_mode.c
+++ b/source/blender/draw/modes/object_mode.c
@@ -354,7 +354,8 @@ enum {
 };
 
 /* Prototypes. */
-static void DRW_shgroup_empty_ex(OBJECT_ShadingGroupList *sgl, float mat[4][4], float *draw_size, char draw_type, float *color);
+static void DRW_shgroup_empty_ex(
+        OBJECT_ShadingGroupList *sgl, const float mat[4][4], const float *draw_size, char draw_type, const float color[4]);
 
 /* *********** FUNCTIONS *********** */
 
@@ -1808,13 +1809,13 @@ static void camera_view3d_stereoscopy_display_extra(
 	}
 }
 
-static void camera_view3d_reconstruction (
+static void camera_view3d_reconstruction(
         OBJECT_ShadingGroupList *sgl,
         Scene *scene,
         View3D *v3d,
         const Object *camera_object,
         Object *ob,
-        float *color,
+        const float color[4],
         const bool is_select)
 {
 	const DRWContextState *draw_ctx = DRW_context_state_get();
@@ -1885,7 +1886,7 @@ static void camera_view3d_reconstruction (
 			copy_m4_m4(bundle_mat, tracking_object_mat);
 			translate_m4(bundle_mat, track->bundle_pos[0], track->bundle_pos[1], track->bundle_pos[2]);
 
-			float *bundle_color;
+			const float *bundle_color;
 			if (track->flag & TRACK_CUSTOMCOLOR) {
 				bundle_color = track->color;
 			}
@@ -2111,7 +2112,7 @@ static void DRW_shgroup_camera(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLay
 }
 
 static void DRW_shgroup_empty_ex(
-        OBJECT_ShadingGroupList *sgl, float mat[4][4], float *draw_size, char draw_type, float *color)
+        OBJECT_ShadingGroupList *sgl, const float mat[4][4], const float *draw_size, char draw_type, const float color[4])
 {
 	switch (draw_type) {
 		case OB_PLAINAXES:



More information about the Bf-blender-cvs mailing list