From 1012e9bbfa61e09a49962e5ca468e239ad75865a Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 28 Apr 2021 13:13:43 -0500 Subject: Cleanup: Fix inconcistent array lengths in function declarations In some cases functions were defined with arguments of different array lengths in headers vs. implementations. This commit fixes some of the cases I ran into, but probably not all of them. --- source/blender/editors/include/ED_screen.h | 2 +- source/blender/editors/include/UI_interface.h | 2 +- source/blender/editors/include/UI_resources.h | 2 +- source/blender/editors/interface/interface_templates.c | 2 +- source/blender/editors/space_view3d/view3d_edit.c | 2 +- source/blender/editors/transform/transform.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'source/blender/editors') diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 169b25a1358..419239d5b7a 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -162,7 +162,7 @@ void ED_area_tag_redraw_no_rebuild(ScrArea *area); void ED_area_tag_redraw_regiontype(ScrArea *area, int type); void ED_area_tag_refresh(ScrArea *area); void ED_area_do_refresh(struct bContext *C, ScrArea *area); -struct AZone *ED_area_azones_update(ScrArea *area, const int mouse_xy[]); +struct AZone *ED_area_azones_update(ScrArea *area, const int mouse_xy[2]); void ED_area_status_text(ScrArea *area, const char *str); void ED_area_newspace(struct bContext *C, ScrArea *area, int type, const bool skip_region_exit); void ED_area_prevspace(struct bContext *C, ScrArea *area); diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index e0d9971529f..bab7054a905 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -2137,7 +2137,7 @@ void uiTemplateComponentMenu(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name); -void uiTemplateNodeSocket(uiLayout *layout, struct bContext *C, float *color); +void uiTemplateNodeSocket(uiLayout *layout, struct bContext *C, float color[4]); void uiTemplateCacheFile(uiLayout *layout, const struct bContext *C, struct PointerRNA *ptr, diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 1820c2f133c..c99c7f681b3 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -451,7 +451,7 @@ int UI_ThemeMenuShadowWidth(void); /* only for buttons in theme editor! */ const unsigned char *UI_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid); -void UI_make_axis_color(const unsigned char *src_col, unsigned char *dst_col, const char axis); +void UI_make_axis_color(const unsigned char src_col[3], unsigned char dst_col[3], const char axis); #ifdef __cplusplus } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 760fbe75688..6ca0f196280 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -7192,7 +7192,7 @@ void uiTemplateComponentMenu(uiLayout *layout, /** \name Node Socket Icon Template * \{ */ -void uiTemplateNodeSocket(uiLayout *layout, bContext *UNUSED(C), float *color) +void uiTemplateNodeSocket(uiLayout *layout, bContext *UNUSED(C), float color[4]) { uiBlock *block = uiLayoutGetBlock(layout); UI_block_align_begin(block); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 358373ea4d1..967ad966320 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -2507,7 +2507,7 @@ static void view_dolly_to_vector_3d(ARegion *region, madd_v3_v3v3fl(rv3d->ofs, orig_ofs, dvec, -(1.0f - dfac)); } -static void viewdolly_apply(ViewOpsData *vod, const int xy[2], const short zoom_invert) +static void viewdolly_apply(ViewOpsData *vod, const int xy[2], const bool zoom_invert) { float zfac = 1.0; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 2fbcbe22349..bb3afd77dba 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -74,7 +74,7 @@ static void drawTransformApply(const struct bContext *C, ARegion *region, void *arg); -static void initSnapSpatial(TransInfo *t, float r_snap[3]); +static void initSnapSpatial(TransInfo *t, float r_snap[2]); bool transdata_check_local_islands(TransInfo *t, short around) { -- cgit v1.2.3