BLI_task threaded looper: do not assert when start == stop.

This can happen quite often in forloops, and would be annoying to have to check for this
in caller code! So now, just return without doing anything in this case.
This commit is contained in:
Bastien Montagne 2016-01-04 17:23:54 +01:00
parent 17eb5b3af6
commit 82d88e42a5

@ -662,7 +662,11 @@ void BLI_task_parallel_range_ex(
ParallelRangeState state; ParallelRangeState state;
int i, num_threads, num_tasks; int i, num_threads, num_tasks;
BLI_assert(start < stop); if (start == stop) {
return;
}
BLI_assert(start <= stop);
/* If it's not enough data to be crunched, don't bother with tasks at all, /* If it's not enough data to be crunched, don't bother with tasks at all,
* do everything from the main thread. * do everything from the main thread.