diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-07-30 17:57:53 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-07-30 18:04:32 +0300 |
commit | d28248595b5936ed5f268418ff9905200660ec69 (patch) | |
tree | 4052254f0ae7a749ee26ac8cfaa8c0a77b52f4e3 | |
parent | a3b6ae9fb9dd76538ec04b9fa6953490d321dd32 (diff) |
Silencing a bunch of compiler warnings
Most of these were mismatched const qualifiers
7 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/collection.c b/source/blender/blenkernel/intern/collection.c index 0c93f304218..04e09d06405 100644 --- a/source/blender/blenkernel/intern/collection.c +++ b/source/blender/blenkernel/intern/collection.c @@ -57,7 +57,7 @@ /******************************** Prototypes ********************************/ -static bool collection_child_add(Collection *parent, Collection *collection, int flag, const bool add_us); +static bool collection_child_add(Collection *parent, Collection *collection, const int flag, const bool add_us); static bool collection_child_remove(Collection *parent, Collection *collection); static bool collection_object_add(Main *bmain, Collection *collection, Object *ob, int flag, const bool add_us); static bool collection_object_remove(Main *bmain, Collection *collection, Object *ob, const bool free_us); diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 516b121031e..6b0c59fb557 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -119,7 +119,7 @@ void ED_view3d_cursor3d_position_rotation( float cursor_co[3], float cursor_quat[4]); void ED_view3d_cursor3d_update( struct bContext *C, const int mval[2], - bool use_depth, enum eV3DCursorOrient orientation); + const bool use_depth, enum eV3DCursorOrient orientation); struct Camera *ED_view3d_camera_data_get(struct View3D *v3d, struct RegionView3D *rv3d); diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 2cc1236e5c6..e94d3a13225 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -4625,7 +4625,7 @@ void VIEW3D_OT_clip_border(wmOperatorType *ot) /* cursor position in vec, result in vec, mval in region coords */ /* note: cannot use event->mval here (called by object_add() */ -void ED_view3d_cursor3d_position(bContext *C, const int mval[2], bool use_depth, float cursor_co[3]) +void ED_view3d_cursor3d_position(bContext *C, const int mval[2], const bool use_depth, float cursor_co[3]) { ARegion *ar = CTX_wm_region(C); View3D *v3d = CTX_wm_view3d(C); diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index a5706f4a003..675441189b0 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -747,7 +747,7 @@ static void bone_children_clear_transflag(int mode, short around, ListBase *lb) /* sets transform flags in the bones * returns total number of bones with BONE_TRANSFORM */ -int count_set_pose_transflags(Object *ob, const int mode, short around, bool has_translate_rotate[2]) +int count_set_pose_transflags(Object *ob, const int mode, const short around, bool has_translate_rotate[2]) { bArmature *arm = ob->data; bPoseChannel *pchan; diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c index c84ce56c58b..4964e94652c 100644 --- a/source/blender/makesrna/intern/rna_define.c +++ b/source/blender/makesrna/intern/rna_define.c @@ -2282,7 +2282,7 @@ void RNA_def_property_update_runtime(PropertyRNA *prop, const void *func) void RNA_def_property_poll_runtime(PropertyRNA *prop, const void *func) { if (prop->type == PROP_POINTER) { - ((PointerPropertyRNA *)prop)->poll = func; + ((PointerPropertyRNA *)prop)->poll = (void *)func; } else { fprintf(stderr, "%s: %s is not a Pointer Property.\n", __func__, prop->identifier); diff --git a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.c b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.c index bf9ab4a5064..af988c0df39 100644 --- a/source/blender/nodes/composite/nodes/node_composite_cryptomatte.c +++ b/source/blender/nodes/composite/nodes/node_composite_cryptomatte.c @@ -37,7 +37,7 @@ /* this is taken from the cryptomatte specification 1.0 */ -static inline float hash_to_float(uint32_t hash) +BLI_INLINE float hash_to_float(uint32_t hash) { uint32_t mantissa = hash & ((1 << 23) - 1); uint32_t exponent = (hash >> 23) & ((1 << 8) - 1); diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_api.h b/source/blender/windowmanager/gizmo/WM_gizmo_api.h index 9b8cecfb4bc..dd39cc96d6f 100644 --- a/source/blender/windowmanager/gizmo/WM_gizmo_api.h +++ b/source/blender/windowmanager/gizmo/WM_gizmo_api.h @@ -104,7 +104,7 @@ void WM_gizmo_set_matrix_offset_rotation_from_yz_axis( struct wmGizmo *gz, const float y_axis[3], const float z_axis[3]); void WM_gizmo_set_flag(struct wmGizmo *gz, const int flag, const bool enable); -void WM_gizmo_set_scale(struct wmGizmo *gz, float scale); +void WM_gizmo_set_scale(struct wmGizmo *gz, const float scale); void WM_gizmo_set_line_width(struct wmGizmo *gz, const float line_width); void WM_gizmo_get_color(const struct wmGizmo *gz, float color[4]); |