Cleanup: use const argument, r_ prefix return arg
authorCampbell Barton <ideasman42@gmail.com>
Thu, 30 May 2019 10:37:16 +0000 (20:37 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 30 May 2019 10:37:16 +0000 (20:37 +1000)
source/blender/draw/intern/draw_common.c
source/blender/draw/intern/draw_common.h

index a2a3ea6..e9c3607 100644 (file)
@@ -551,7 +551,7 @@ struct DRWCallBuffer *buffer_instance_empty_axes(DRWPass *pass,
 
 struct DRWCallBuffer *buffer_instance_outline(DRWPass *pass,
                                               struct GPUBatch *geom,
-                                              int *baseid,
+                                              const int *baseid,
                                               eGPUShaderConfig sh_cfg)
 {
   GPUShader *sh_inst = GPU_shader_get_builtin_shader_with_config(
@@ -1205,7 +1205,7 @@ float *DRW_color_background_blend_get(int theme_id)
   return ret;
 }
 
-bool DRW_object_is_flat(Object *ob, int *axis)
+bool DRW_object_is_flat(Object *ob, int *r_axis)
 {
   float dim[3];
 
@@ -1216,15 +1216,15 @@ bool DRW_object_is_flat(Object *ob, int *axis)
 
   BKE_object_dimensions_get(ob, dim);
   if (dim[0] == 0.0f) {
-    *axis = 0;
+    *r_axis = 0;
     return true;
   }
   else if (dim[1] == 0.0f) {
-    *axis = 1;
+    *r_axis = 1;
     return true;
   }
   else if (dim[2] == 0.0f) {
-    *axis = 2;
+    *r_axis = 2;
     return true;
   }
   return false;
index 506061d..9c9e3a9 100644 (file)
@@ -156,7 +156,7 @@ struct DRWCallBuffer *buffer_instance(struct DRWPass *pass,
 struct DRWCallBuffer *buffer_instance_alpha(struct DRWShadingGroup *grp, struct GPUBatch *geom);
 struct DRWCallBuffer *buffer_instance_outline(struct DRWPass *pass,
                                               struct GPUBatch *geom,
-                                              int *baseid,
+                                              const int *baseid,
                                               eGPUShaderConfig sh_cfg);
 struct DRWCallBuffer *buffer_camera_instance(struct DRWPass *pass,
                                              struct GPUBatch *geom,
@@ -203,7 +203,7 @@ struct DRWView *DRW_view_create_with_zoffset(const RegionView3D *rv3d, float off
 int DRW_object_wire_theme_get(struct Object *ob, struct ViewLayer *view_layer, float **r_color);
 float *DRW_color_background_blend_get(int theme_id);
 
-bool DRW_object_is_flat(Object *ob, int *axis);
+bool DRW_object_is_flat(Object *ob, int *r_axis);
 bool DRW_object_axis_orthogonal_to_view(Object *ob, int axis);
 
 /* draw_armature.c */