diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-09 01:35:37 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-09 02:13:43 +0300 |
commit | 21462565632b876ac4eadf2bd30573f2fda70c76 (patch) | |
tree | 483da4fc20c4c8cc7198abd6edd5f3a53aa90b91 /source/blender/gpu/intern/gpu_vertex_format.cc | |
parent | 626c844105afc3b2455f5a1b87ac8a7839a7e0bf (diff) |
Cleanup: use ELEM macro
Diffstat (limited to 'source/blender/gpu/intern/gpu_vertex_format.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_vertex_format.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_vertex_format.cc b/source/blender/gpu/intern/gpu_vertex_format.cc index eedd660d0a9..a9ac191754b 100644 --- a/source/blender/gpu/intern/gpu_vertex_format.cc +++ b/source/blender/gpu/intern/gpu_vertex_format.cc @@ -133,7 +133,7 @@ uint GPU_vertformat_attr_add(GPUVertFormat *format, case GPU_COMP_I10: /* 10_10_10 format intended for normals (xyz) or colors (rgb) * extra component packed.w can be manually set to { -2, -1, 0, 1 } */ - assert(comp_len == 3 || comp_len == 4); + assert(ELEM(comp_len, 3, 4)); /* Not strictly required, may relax later. */ assert(fetch_mode == GPU_FETCH_INT_TO_FLOAT_UNIT); @@ -143,7 +143,7 @@ uint GPU_vertformat_attr_add(GPUVertFormat *format, /* integer types can be kept as int or converted/normalized to float */ assert(fetch_mode != GPU_FETCH_FLOAT); /* only support float matrices (see Batch_update_program_bindings) */ - assert(comp_len != 8 && comp_len != 12 && comp_len != 16); + assert(!ELEM(comp_len, 8, 12, 16)); } #endif format->name_len++; /* Multi-name support. */ |