diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-06 04:32:54 +0300 |
commit | aa3a4973a30ff668a62447e18ac41f6c916b4a8b (patch) | |
tree | 1b24cc55995ba8b3d72aaabd9400a3e1e030d540 /source/blender/windowmanager/intern/wm_jobs.c | |
parent | 7cb20d841da16d0bffb63154403267500e9941f5 (diff) |
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/windowmanager/intern/wm_jobs.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_jobs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_jobs.c b/source/blender/windowmanager/intern/wm_jobs.c index fc65a072b6a..a1140c01d44 100644 --- a/source/blender/windowmanager/intern/wm_jobs.c +++ b/source/blender/windowmanager/intern/wm_jobs.c @@ -227,7 +227,7 @@ bool WM_jobs_test(wmWindowManager *wm, void *owner, int job_type) /* job can be running or about to run (suspended) */ for (wm_job = wm->jobs.first; wm_job; wm_job = wm_job->next) { if (wm_job->owner == owner) { - if (job_type == WM_JOB_TYPE_ANY || (wm_job->job_type == job_type)) { + if (ELEM(job_type, WM_JOB_TYPE_ANY, wm_job->job_type)) { if (wm_job->running || wm_job->suspended) { return true; } @@ -587,7 +587,7 @@ void WM_jobs_kill_type(struct wmWindowManager *wm, void *owner, int job_type) next_job = wm_job->next; if (!owner || wm_job->owner == owner) { - if (job_type == WM_JOB_TYPE_ANY || wm_job->job_type == job_type) { + if (ELEM(job_type, WM_JOB_TYPE_ANY, wm_job->job_type)) { wm_jobs_kill_job(wm, wm_job); } } |