Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/intern/subdiv_mesh.c2
-rw-r--r--source/blender/draw/intern/draw_cache_impl_subdivision.cc9
-rw-r--r--source/blender/io/alembic/intern/abc_customdata.cc2
-rw-r--r--source/blender/windowmanager/xr/intern/wm_xr_operators.c2
4 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_mesh.c b/source/blender/blenkernel/intern/subdiv_mesh.c
index 9630b30a21e..5bf519e5f70 100644
--- a/source/blender/blenkernel/intern/subdiv_mesh.c
+++ b/source/blender/blenkernel/intern/subdiv_mesh.c
@@ -1118,7 +1118,7 @@ static void subdiv_mesh_vertex_of_loose_edge(const struct SubdivForeachContext *
find_edge_neighbors(ctx, coarse_edge, neighbors);
/* Interpolate custom data when not an end point.
* This data has already been copied from the original vertex by #subdiv_mesh_vertex_loose. */
- if (u != 0.0 && u != 1.0) {
+ if (!ELEM(u, 0.0, 1.0)) {
subdiv_mesh_vertex_of_loose_edge_interpolate(ctx, coarse_edge, u, subdiv_vertex_index);
}
/* Interpolate coordinate. */
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) {
diff --git a/source/blender/io/alembic/intern/abc_customdata.cc b/source/blender/io/alembic/intern/abc_customdata.cc
index 26203864cf8..c3ff64fd0ad 100644
--- a/source/blender/io/alembic/intern/abc_customdata.cc
+++ b/source/blender/io/alembic/intern/abc_customdata.cc
@@ -620,7 +620,7 @@ AbcUvScope get_uv_scope(const Alembic::AbcGeom::GeometryScope scope,
/* kVaryingScope is sometimes used for vertex scopes as the values vary across the vertices. To
* be sure, one has to check the size of the data against the number of vertices, as it could
* also be a varying attribute across the faces (i.e. one value per face). */
- if ((scope == kVaryingScope || scope == kVertexScope) && indices->size() == config.totvert) {
+ if ((ELEM(scope, kVaryingScope, kVertexScope)) && indices->size() == config.totvert) {
return ABC_UV_SCOPE_VERTEX;
}
diff --git a/source/blender/windowmanager/xr/intern/wm_xr_operators.c b/source/blender/windowmanager/xr/intern/wm_xr_operators.c
index c503f5d4fee..9c2eaefd61c 100644
--- a/source/blender/windowmanager/xr/intern/wm_xr_operators.c
+++ b/source/blender/windowmanager/xr/intern/wm_xr_operators.c
@@ -956,7 +956,7 @@ static int wm_xr_navigation_fly_modal(bContext *C, wmOperator *op, const wmEvent
const double time_now = PIL_check_seconds_timer();
mode = (eXrFlyMode)RNA_enum_get(op->ptr, "mode");
- turn = (mode == XR_FLY_TURNLEFT || mode == XR_FLY_TURNRIGHT);
+ turn = (ELEM(mode, XR_FLY_TURNLEFT, XR_FLY_TURNRIGHT));
locz_lock = RNA_boolean_get(op->ptr, "lock_location_z");
dir_lock = RNA_boolean_get(op->ptr, "lock_direction");