diff options
author | Campbell Barton <campbell@blender.org> | 2022-01-07 07:30:14 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-01-07 09:48:25 +0300 |
commit | 164202831032164ed52108b4a365b9ff9ca4ac84 (patch) | |
tree | 75d6f253896f58c16d95c78b721cd758afbdbe10 /source/blender/draw/intern/draw_cache_impl_subdivision.cc | |
parent | 82858ca3f4e6dc6f840af9306c350900abd491fc (diff) |
Cleanup: use the ELEM macro
Diffstat (limited to 'source/blender/draw/intern/draw_cache_impl_subdivision.cc')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_subdivision.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/draw/intern/draw_cache_impl_subdivision.cc b/source/blender/draw/intern/draw_cache_impl_subdivision.cc index 06b83a379e4..372566a8f90 100644 --- a/source/blender/draw/intern/draw_cache_impl_subdivision.cc +++ b/source/blender/draw/intern/draw_cache_impl_subdivision.cc @@ -258,10 +258,11 @@ static GPUShader *get_patch_evaluation_shader(int shader_type) static GPUShader *get_subdiv_shader(int shader_type, const char *defines) { - if (shader_type == SHADER_PATCH_EVALUATION || - shader_type == SHADER_PATCH_EVALUATION_LIMIT_NORMALS || - shader_type == SHADER_PATCH_EVALUATION_FVAR || - shader_type == SHADER_PATCH_EVALUATION_FACE_DOTS) { + if (ELEM(shader_type, + SHADER_PATCH_EVALUATION, + SHADER_PATCH_EVALUATION_LIMIT_NORMALS, + SHADER_PATCH_EVALUATION_FVAR, + SHADER_PATCH_EVALUATION_FACE_DOTS)) { return get_patch_evaluation_shader(shader_type); } if (g_subdiv_shaders[shader_type] == nullptr) { |