From 725973485a909c2b732c58bd49d06a75edd52f7e Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 13 Jul 2020 11:27:09 +0200 Subject: Clang Tidy: enable readability-non-const-parameter warning Clang Tidy reported a couple of false positives. I disabled those `NOLINTNEXTLINE`. Differential Revision: https://developer.blender.org/D8199 --- source/blender/editors/space_image/image_buttons.c | 8 ++++++-- source/blender/editors/space_image/image_draw.c | 8 ++++---- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/space_image') diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 24ec2393b69..1f8dd7cfe44 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -572,8 +572,12 @@ static void image_multiview_cb(bContext *C, void *rnd_pt, void *UNUSED(arg_v)) WM_event_add_notifier(C, NC_IMAGE | ND_DRAW, NULL); } -static void uiblock_layer_pass_buttons( - uiLayout *layout, Image *image, RenderResult *rr, ImageUser *iuser, int w, short *render_slot) +static void uiblock_layer_pass_buttons(uiLayout *layout, + Image *image, + RenderResult *rr, + ImageUser *iuser, + int w, + const short *render_slot) { struct ImageUI_Data rnd_pt_local, *rnd_pt = NULL; uiBlock *block = uiLayoutGetBlock(layout); diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 9040ca5e79c..a7fa7709c51 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -150,8 +150,8 @@ void ED_image_draw_info(Scene *scene, const uchar cp[4], const float fp[4], const float linearcol[4], - int *zp, - float *zpf) + const int *zp, + const float *zpf) { rcti color_rect; char str[256]; @@ -463,7 +463,7 @@ void ED_image_draw_info(Scene *scene, /* image drawing */ static void sima_draw_zbuf_pixels( - float x1, float y1, int rectx, int recty, int *rect, float zoomx, float zoomy) + float x1, float y1, int rectx, int recty, const int *rect, float zoomx, float zoomy) { float red[4] = {1.0f, 0.0f, 0.0f, 0.0f}; @@ -489,7 +489,7 @@ static void sima_draw_zbuffloat_pixels(Scene *scene, float y1, int rectx, int recty, - float *rect_float, + const float *rect_float, float zoomx, float zoomy) { -- cgit v1.2.3