diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-10-01 20:58:52 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-10-01 21:47:22 +0300 |
commit | 342bdbc1769fa31c734d7c38ab67be3428c9d234 (patch) | |
tree | 664ca715867097f295f3a8b2a45ae3d8c15715e9 /source | |
parent | c3238bd50010e43ad97edb07ca1b2fe04ddf7f45 (diff) |
Fix warnings in cloth brush int casts
Use POINTER_AS_INT instead
Reviewed By: HooglyBoogly
Differential Revision: https://developer.blender.org/D9083
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_cloth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_cloth.c b/source/blender/editors/sculpt_paint/sculpt_cloth.c index 7b14f48c6a8..61455cc28bb 100644 --- a/source/blender/editors/sculpt_paint/sculpt_cloth.c +++ b/source/blender/editors/sculpt_paint/sculpt_cloth.c @@ -277,7 +277,7 @@ static void do_cloth_brush_build_constraints_task_cb_ex( const Brush *brush = data->brush; PBVHNode *node = data->nodes[n]; - const int node_index = (int)(BLI_ghash_lookup(data->cloth_sim->node_state_index, node)); + const int node_index = POINTER_AS_INT(BLI_ghash_lookup(data->cloth_sim->node_state_index, node)); if (data->cloth_sim->node_state[node_index] != SCULPT_CLOTH_NODE_UNINITIALIZED) { /* The simulation already contains constraints for this node. */ return; @@ -693,7 +693,7 @@ static void do_cloth_brush_solve_simulation_task_cb_ex( SculptClothSimulation *cloth_sim = data->cloth_sim; const float time_step = data->cloth_time_step; - const int node_index = (int)(BLI_ghash_lookup(data->cloth_sim->node_state_index, node)); + const int node_index = POINTER_AS_INT(BLI_ghash_lookup(data->cloth_sim->node_state_index, node)); if (data->cloth_sim->node_state[node_index] != SCULPT_CLOTH_NODE_ACTIVE) { return; } @@ -1062,7 +1062,7 @@ void SCULPT_cloth_sim_activate_nodes(SculptClothSimulation *cloth_sim, { /* Activate the nodes inside the simulation area. */ for (int n = 0; n < totnode; n++) { - const int node_index = (int)(BLI_ghash_lookup(cloth_sim->node_state_index, nodes[n])); + const int node_index = POINTER_AS_INT(BLI_ghash_lookup(cloth_sim->node_state_index, nodes[n])); cloth_sim->node_state[node_index] = SCULPT_CLOTH_NODE_ACTIVE; } } |