Fix smoke BLI_task'ed code after recent refactor.
authorBastien Montagne <montagne29@wanadoo.fr>
Sat, 16 Jan 2016 20:43:10 +0000 (21:43 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Sat, 16 Jan 2016 20:44:07 +0000 (21:44 +0100)
Curse gcc for not erroring by default on passing wrong func pointers... :/

source/blender/blenkernel/intern/smoke.c

index 98f7dfd4e7e02de45067e430bf08aa8b7eab24c1..f5a6644e1bb8f3ce85aeb72b2e95f1c2fd81753d 100644 (file)
@@ -697,7 +697,7 @@ typedef struct ObstaclesFromDMData {
        float *velocityX, *velocityY, *velocityZ;
 } ObstaclesFromDMData;
 
-static void obstacles_from_derivedmesh_task_cb(void *userdata, void *UNUSED(userdata_chunk), int z)
+static void obstacles_from_derivedmesh_task_cb(void *userdata, const int z)
 {
        ObstaclesFromDMData *data = userdata;
        SmokeDomainSettings *sds = data->sds;
@@ -825,8 +825,8 @@ static void obstacles_from_derivedmesh(
                            .has_velocity = has_velocity, .vert_vel = vert_vel,
                            .velocityX = velocityX, .velocityY = velocityY, .velocityZ = velocityZ
                        };
-                       BLI_task_parallel_range_ex(
-                                   sds->res_min[2], sds->res_max[2], &data, NULL, 0, obstacles_from_derivedmesh_task_cb, true, false);
+                       BLI_task_parallel_range(
+                                   sds->res_min[2], sds->res_max[2], &data, obstacles_from_derivedmesh_task_cb, true);
                }
                /* free bvh tree */
                free_bvhtree_from_mesh(&treeData);
@@ -1131,7 +1131,7 @@ typedef struct EmitFromParticlesData {
        float hr_smooth;
 } EmitFromParticlesData;
 
-static void emit_from_particles_task_cb(void *userdata, void *UNUSED(userdata_chunk), int z)
+static void emit_from_particles_task_cb(void *userdata, const int z)
 {
        EmitFromParticlesData *data = userdata;
        SmokeFlowSettings *sfs = data->sfs;
@@ -1342,7 +1342,7 @@ static void emit_from_particles(
                            .solid = solid, .smooth = smooth, .hr_smooth = hr_smooth,
                        };
 
-                       BLI_task_parallel_range_ex(min[2], max[2], &data, NULL, 0, emit_from_particles_task_cb, true, false);
+                       BLI_task_parallel_range(min[2], max[2], &data, emit_from_particles_task_cb, true);
                }
 
                if (sfs->flags & MOD_SMOKE_FLOW_USE_PART_SIZE) {
@@ -1514,7 +1514,7 @@ typedef struct EmitFromDMData {
        int *min, *max, *res;
 } EmitFromDMData;
 
-static void emit_from_derivedmesh_task_cb(void *userdata, void *UNUSED(userdata_chunk), int z)
+static void emit_from_derivedmesh_task_cb(void *userdata, const int z)
 {
        EmitFromDMData *data = userdata;
        EmissionMap *em = data->em;
@@ -1667,7 +1667,7 @@ static void emit_from_derivedmesh(Object *flow_ob, SmokeDomainSettings *sds, Smo
                            .flow_center = flow_center, .min = min, .max = max, .res = res,
                        };
 
-                       BLI_task_parallel_range_ex(min[2], max[2], &data, NULL, 0, emit_from_derivedmesh_task_cb, true, false);
+                       BLI_task_parallel_range(min[2], max[2], &data, emit_from_derivedmesh_task_cb, true);
                }
                /* free bvh tree */
                free_bvhtree_from_mesh(&treeData);
@@ -2383,7 +2383,7 @@ typedef struct UpdateEffectorsData {
        unsigned char *obstacle;
 } UpdateEffectorsData;
 
-static void update_effectors_task_cb(void *userdata, void *UNUSED(userdata_chunk), int x)
+static void update_effectors_task_cb(void *userdata, const int x)
 {
        UpdateEffectorsData *data = userdata;
        SmokeDomainSettings *sds = data->sds;
@@ -2457,7 +2457,7 @@ static void update_effectors(Scene *scene, Object *ob, SmokeDomainSettings *sds,
                data.velocity_z = smoke_get_velocity_z(sds->fluid);
                data.obstacle = smoke_get_obstacle(sds->fluid);
 
-               BLI_task_parallel_range_ex(0, sds->res[0], &data, NULL, 0, update_effectors_task_cb, true, false);
+               BLI_task_parallel_range(0, sds->res[0], &data, update_effectors_task_cb, true);
        }
 
        pdEndEffectors(&effectors);