Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-03-05 00:33:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-03-05 00:38:41 +0300
commit1da8ed2a9737088a29f8782b290ba237bd0e813c (patch)
tree9bcb8424c7d58ae7a082e747e95f5aad1fac72d7 /source/blender
parent2fb4de1f8c1b3117da47aff39972d92cc078dd29 (diff)
Cleanup: redundant casts
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/fcurve.c2
-rw-r--r--source/blender/editors/animation/keyframing.c22
-rw-r--r--source/blender/editors/interface/interface_layout.c2
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/editors/space_action/action_data.c2
-rw-r--r--source/blender/editors/space_buttons/buttons_context.c2
-rw-r--r--source/blender/editors/space_graph/graph_edit.c4
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c2
-rw-r--r--source/blender/python/intern/bpy_rna_anim.c4
9 files changed, 21 insertions, 21 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index 251c6421d66..ee6daa632fc 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -373,7 +373,7 @@ FCurve *rna_get_fcurve_context_ui(bContext *C,
/* Special case for NLA Control Curves... */
if (BKE_nlastrip_has_curves_for_property(ptr, prop)) {
- NlaStrip *strip = (NlaStrip *)ptr->data;
+ NlaStrip *strip = ptr->data;
/* Set the special flag, since it cannot be a normal action/driver
* if we've been told to start looking here...
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 6c4fe93e19a..315761e9893 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -223,7 +223,7 @@ FCurve *verify_fcurve(Main *bmain,
/* sync bone group colors if applicable */
if (ptr && (ptr->type == &RNA_PoseBone)) {
Object *ob = (Object *)ptr->owner_id;
- bPoseChannel *pchan = (bPoseChannel *)ptr->data;
+ bPoseChannel *pchan = ptr->data;
bPose *pose = ob->pose;
bActionGroup *grp;
@@ -821,7 +821,7 @@ static bool visualkey_can_use(PointerRNA *ptr, PropertyRNA *prop)
*/
if (ptr->type == &RNA_Object) {
/* Object */
- Object *ob = (Object *)ptr->data;
+ Object *ob = ptr->data;
RigidBodyOb *rbo = ob->rigidbody_object;
con = ob->constraints.first;
@@ -833,7 +833,7 @@ static bool visualkey_can_use(PointerRNA *ptr, PropertyRNA *prop)
}
else if (ptr->type == &RNA_PoseBone) {
/* Pose Channel */
- bPoseChannel *pchan = (bPoseChannel *)ptr->data;
+ bPoseChannel *pchan = ptr->data;
con = pchan->constraints.first;
identifier = RNA_property_identifier(prop);
@@ -983,7 +983,7 @@ static float *visualkey_get_values(
* - assume that array_index will be sane
*/
if (ptr->type == &RNA_Object) {
- Object *ob = (Object *)ptr->data;
+ Object *ob = ptr->data;
/* Loc code is specific... */
if (strstr(identifier, "location")) {
copy_v3_v3(buffer, ob->obmat[3]);
@@ -995,7 +995,7 @@ static float *visualkey_get_values(
rotmode = ob->rotmode;
}
else if (ptr->type == &RNA_PoseBone) {
- bPoseChannel *pchan = (bPoseChannel *)ptr->data;
+ bPoseChannel *pchan = ptr->data;
BKE_armature_mat_pose_to_bone(pchan, pchan->pose_mat, tmat);
rotmode = pchan->rotmode;
@@ -2375,7 +2375,7 @@ static int insert_key_button_exec(bContext *C, wmOperator *op)
* strips themselves. These are stored separately or else the properties will
* not have any effect.
*/
- NlaStrip *strip = (NlaStrip *)ptr.data;
+ NlaStrip *strip = ptr.data;
FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index);
if (fcu) {
@@ -2416,7 +2416,7 @@ static int insert_key_button_exec(bContext *C, wmOperator *op)
* TODO: Perhaps we can extend this behavior in future for other properties...
*/
if (ptr.type == &RNA_PoseBone) {
- bPoseChannel *pchan = (bPoseChannel *)ptr.data;
+ bPoseChannel *pchan = ptr.data;
group = pchan->name;
}
else if ((ptr.type == &RNA_Object) &&
@@ -2467,7 +2467,7 @@ static int insert_key_button_exec(bContext *C, wmOperator *op)
RPT_WARNING,
"Button doesn't appear to have any property information attached (ptr.data = "
"%p, prop = %p)",
- (void *)ptr.data,
+ ptr.data,
(void *)prop);
}
}
@@ -2535,7 +2535,7 @@ static int delete_key_button_exec(bContext *C, wmOperator *op)
* not have any effect.
*/
ID *id = ptr.owner_id;
- NlaStrip *strip = (NlaStrip *)ptr.data;
+ NlaStrip *strip = ptr.data;
FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), 0);
if (fcu) {
@@ -2586,7 +2586,7 @@ static int delete_key_button_exec(bContext *C, wmOperator *op)
}
}
else if (G.debug & G_DEBUG) {
- printf("ptr.data = %p, prop = %p\n", (void *)ptr.data, (void *)prop);
+ printf("ptr.data = %p, prop = %p\n", ptr.data, (void *)prop);
}
if (success) {
@@ -2653,7 +2653,7 @@ static int clear_key_button_exec(bContext *C, wmOperator *op)
}
}
else if (G.debug & G_DEBUG) {
- printf("ptr.data = %p, prop = %p\n", (void *)ptr.data, (void *)prop);
+ printf("ptr.data = %p, prop = %p\n", ptr.data, (void *)prop);
}
if (success) {
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 91b56177eac..a797316cc98 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -534,7 +534,7 @@ static void ui_item_array(uiLayout *layout,
buth = unit;
if (ptr->type == &RNA_Armature) {
- bArmature *arm = (bArmature *)ptr->data;
+ bArmature *arm = ptr->data;
layer_used = arm->layer_used;
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 13844a4f7b4..006e1ebc6be 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -2260,7 +2260,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
}
}
- matarar = (Material ***)BKE_object_material_array_p(ob);
+ matarar = BKE_object_material_array_p(ob);
if (matarar) {
for (a = 0; a < ob->totcol; a++) {
ma = (*matarar)[a];
diff --git a/source/blender/editors/space_action/action_data.c b/source/blender/editors/space_action/action_data.c
index 71802dd844f..228cc77744f 100644
--- a/source/blender/editors/space_action/action_data.c
+++ b/source/blender/editors/space_action/action_data.c
@@ -250,7 +250,7 @@ static int action_new_exec(bContext *C, wmOperator *UNUSED(op))
* or else the user gets decremented twice!
*/
if (ptr.type == &RNA_SpaceDopeSheetEditor) {
- SpaceAction *saction = (SpaceAction *)ptr.data;
+ SpaceAction *saction = ptr.data;
saction->action = NULL;
}
}
diff --git a/source/blender/editors/space_buttons/buttons_context.c b/source/blender/editors/space_buttons/buttons_context.c
index 813290cbe97..035239cc7d0 100644
--- a/source/blender/editors/space_buttons/buttons_context.c
+++ b/source/blender/editors/space_buttons/buttons_context.c
@@ -1233,7 +1233,7 @@ ID *buttons_context_id_path(const bContext *C)
/* pin particle settings instead of system, since only settings are an idblock*/
if (sbuts->mainb == BCONTEXT_PARTICLE && sbuts->flag & SB_PIN_CONTEXT) {
if (ptr->type == &RNA_ParticleSystem && ptr->data) {
- ParticleSystem *psys = (ParticleSystem *)ptr->data;
+ ParticleSystem *psys = ptr->data;
return &psys->part->id;
}
}
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index d38edf45e8f..aea9308afdb 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -3476,7 +3476,7 @@ static int graph_driver_vars_copy_exec(bContext *C, wmOperator *op)
PointerRNA ptr = CTX_data_pointer_get_type(C, "active_editable_fcurve", &RNA_FCurve);
/* if this exists, call the copy driver vars API function */
- FCurve *fcu = (FCurve *)ptr.data;
+ FCurve *fcu = ptr.data;
if (fcu) {
ok = ANIM_driver_vars_copy(op->reports, fcu);
@@ -3516,7 +3516,7 @@ static int graph_driver_vars_paste_exec(bContext *C, wmOperator *op)
PointerRNA ptr = CTX_data_pointer_get_type(C, "active_editable_fcurve", &RNA_FCurve);
/* if this exists, call the paste driver vars API function */
- FCurve *fcu = (FCurve *)ptr.data;
+ FCurve *fcu = ptr.data;
if (fcu) {
ok = ANIM_driver_vars_paste(op->reports, fcu, replace);
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 5c5c5ade726..4503de3beda 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -1791,7 +1791,7 @@ static void tree_element_to_path(TreeElement *te,
/* ptr->data not ptr->owner_id seems to be the one we want,
* since ptr->data is sometimes the owner of this ID? */
if (RNA_struct_is_ID(ptr->type)) {
- *id = (ID *)ptr->data;
+ *id = ptr->data;
/* clear path */
if (*path) {
diff --git a/source/blender/python/intern/bpy_rna_anim.c b/source/blender/python/intern/bpy_rna_anim.c
index bda7d342576..2fe67b02000 100644
--- a/source/blender/python/intern/bpy_rna_anim.c
+++ b/source/blender/python/intern/bpy_rna_anim.c
@@ -353,7 +353,7 @@ PyObject *pyrna_struct_keyframe_insert(BPy_StructRNA *self, PyObject *args, PyOb
}
if (prop) {
- NlaStrip *strip = (NlaStrip *)ptr.data;
+ NlaStrip *strip = ptr.data;
FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index);
result = insert_keyframe_direct(&reports, ptr, prop, fcu, cfra, keytype, NULL, options);
@@ -452,7 +452,7 @@ PyObject *pyrna_struct_keyframe_delete(BPy_StructRNA *self, PyObject *args, PyOb
if (prop) {
ID *id = ptr.owner_id;
- NlaStrip *strip = (NlaStrip *)ptr.data;
+ NlaStrip *strip = ptr.data;
FCurve *fcu = list_find_fcurve(&strip->fcurves, RNA_property_identifier(prop), index);
/* NOTE: This should be true, or else we wouldn't be able to get here. */