Silencing a bunch of compiler warnings

Most of these were mismatched const qualifiers
This commit is contained in:
2018-07-31 02:57:53 +12:00
parent a3b6ae9fb9
commit d28248595b
7 changed files with 7 additions and 7 deletions

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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);

View File

@@ -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]);