diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-10-20 02:45:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-10-20 03:16:43 +0300 |
commit | b280699078eee23bd8eb572668d6f0d8972d879a (patch) | |
tree | 8b6b8461938e71914d28e707137a8960f8a2d03c /source/blender/draw/intern/draw_cache_impl_displist.c | |
parent | ef9269bd62f31e39d39cc59cd34354b53eae6661 (diff) |
Cleanup: use elem macros
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_displist.c')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_displist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_displist.c b/source/blender/draw/intern/draw_cache_impl_displist.c index 1fed5d79697..fb8f998f036 100644 --- a/source/blender/draw/intern/draw_cache_impl_displist.c +++ b/source/blender/draw/intern/draw_cache_impl_displist.c @@ -372,10 +372,10 @@ static void surf_uv_quad(const DispList *dl, const uint quad[4], float r_uv[4][2 r_uv[i][1] = (quad[i] % dl->nr) / (float)orco_sizeu; /* cyclic correction */ - if ((i == 1 || i == 2) && r_uv[i][0] == 0.0f) { + if (ELEM(i, 1, 2) && r_uv[i][0] == 0.0f) { r_uv[i][0] = 1.0f; } - if ((i == 0 || i == 1) && r_uv[i][1] == 0.0f) { + if (ELEM(i, 0, 1) && r_uv[i][1] == 0.0f) { r_uv[i][1] = 1.0f; } } |