From 69d127cadefbd9da6f8f11e3e32b77baebd20ea4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 17 Apr 2014 21:14:34 +1000 Subject: Code cleanup: use const for array args --- source/blender/editors/space_view3d/drawvolume.c | 10 +++++----- source/blender/editors/space_view3d/view3d_intern.h | 9 +++++---- source/blender/editors/space_view3d/view3d_view.c | 2 +- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/source/blender/editors/space_view3d/drawvolume.c b/source/blender/editors/space_view3d/drawvolume.c index 32e21a0fbbe..f3088cee63b 100644 --- a/source/blender/editors/space_view3d/drawvolume.c +++ b/source/blender/editors/space_view3d/drawvolume.c @@ -116,8 +116,8 @@ static bool convex(const float p0[3], const float up[3], const float a[3], const } void draw_smoke_volume(SmokeDomainSettings *sds, Object *ob, - GPUTexture *tex, float min[3], float max[3], - int res[3], float dx, float UNUSED(base_scale), float viewnormal[3], + GPUTexture *tex, const float min[3], const float max[3], + const int res[3], float dx, float UNUSED(base_scale), const float viewnormal[3], GPUTexture *tex_shadow, GPUTexture *tex_flame) { const float ob_sizei[3] = { @@ -410,9 +410,9 @@ void draw_smoke_volume(SmokeDomainSettings *sds, Object *ob, } if (!GPU_non_power_of_two_support()) { - cor[0] = (float)res[0] / (float)power_of_2_max_i(res[0]); - cor[1] = (float)res[1] / (float)power_of_2_max_i(res[1]); - cor[2] = (float)res[2] / (float)power_of_2_max_i(res[2]); + cor[0] = (float)res[0] / (float)power_of_2_max_u(res[0]); + cor[1] = (float)res[1] / (float)power_of_2_max_u(res[1]); + cor[2] = (float)res[2] / (float)power_of_2_max_u(res[2]); } cor[0] /= size[0]; diff --git a/source/blender/editors/space_view3d/view3d_intern.h b/source/blender/editors/space_view3d/view3d_intern.h index 3e7c97abaa9..3f5d35aa065 100644 --- a/source/blender/editors/space_view3d/view3d_intern.h +++ b/source/blender/editors/space_view3d/view3d_intern.h @@ -204,8 +204,9 @@ void VIEW3D_OT_game_start(struct wmOperatorType *ot); bool ED_view3d_boundbox_clip_ex(RegionView3D *rv3d, const struct BoundBox *bb, float obmat[4][4]); bool ED_view3d_boundbox_clip(RegionView3D *rv3d, const struct BoundBox *bb); -void ED_view3d_smooth_view(struct bContext *C, struct View3D *v3d, struct ARegion *ar, struct Object *, struct Object *, - float *ofs, float *quat, float *dist, float *lens, +void ED_view3d_smooth_view(struct bContext *C, struct View3D *v3d, struct ARegion *ar, + struct Object *camera_old, struct Object *camera, + const float *ofs, const float *quat, const float *dist, const float *lens, const int smooth_viewtx); void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect); @@ -259,8 +260,8 @@ extern const char *view3d_context_dir[]; /* doc access */ /* draw_volume.c */ void draw_smoke_volume(struct SmokeDomainSettings *sds, struct Object *ob, - struct GPUTexture *tex, float min[3], float max[3], - int res[3], float dx, float base_scale, float viewnormal[3], + struct GPUTexture *tex, const float min[3], const float max[3], + const int res[3], float dx, float base_scale, const float viewnormal[3], struct GPUTexture *tex_shadow, struct GPUTexture *tex_flame); //#define SMOKE_DEBUG_VELOCITY diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c index fdfce062adc..5c3eb57d419 100644 --- a/source/blender/editors/space_view3d/view3d_view.c +++ b/source/blender/editors/space_view3d/view3d_view.c @@ -164,7 +164,7 @@ static void view3d_smooth_view_state_restore(const struct SmoothView3DState *sms /* will start timer if appropriate */ /* the arguments are the desired situation */ void ED_view3d_smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Object *camera, - float *ofs, float *quat, float *dist, float *lens, + const float *ofs, const float *quat, const float *dist, const float *lens, const int smooth_viewtx) { wmWindowManager *wm = CTX_wm_manager(C); -- cgit v1.2.3