From 21462565632b876ac4eadf2bd30573f2fda70c76 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 9 Mar 2022 09:35:37 +1100 Subject: Cleanup: use ELEM macro --- source/blender/gpu/intern/gpu_vertex_format.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/gpu/intern/gpu_vertex_format.cc') 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. */ -- cgit v1.2.3