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:
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/function/nodes/node_fn_boolean_math.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_float_compare.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc3
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc12
-rw-r--r--source/blender/nodes/intern/node_geometry_exec.cc6
-rw-r--r--source/blender/nodes/intern/node_tree_ref.cc6
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vector_math.cc3
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc3
9 files changed, 14 insertions, 31 deletions
diff --git a/source/blender/nodes/function/nodes/node_fn_boolean_math.cc b/source/blender/nodes/function/nodes/node_fn_boolean_math.cc
index 7a83ff8e016..ce333022828 100644
--- a/source/blender/nodes/function/nodes/node_fn_boolean_math.cc
+++ b/source/blender/nodes/function/nodes/node_fn_boolean_math.cc
@@ -74,9 +74,7 @@ static const blender::fn::MultiFunction &get_multi_function(bNode &bnode)
case NODE_BOOLEAN_MATH_NOT:
return not_fn;
}
-
- BLI_assert(false);
- return blender::fn::dummy_multi_function;
+ BLI_UNREACHABLE_ABORT;
}
static void node_boolean_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder)
diff --git a/source/blender/nodes/function/nodes/node_fn_float_compare.cc b/source/blender/nodes/function/nodes/node_fn_float_compare.cc
index 6c8df8f2ea0..5f05d6ad8f9 100644
--- a/source/blender/nodes/function/nodes/node_fn_float_compare.cc
+++ b/source/blender/nodes/function/nodes/node_fn_float_compare.cc
@@ -93,9 +93,7 @@ static const blender::fn::MultiFunction &get_multi_function(bNode &node)
case NODE_FLOAT_COMPARE_NOT_EQUAL:
return not_equal_fn;
}
-
- BLI_assert(false);
- return blender::fn::dummy_multi_function;
+ BLI_UNREACHABLE_ABORT;
}
static void node_float_compare_expand_in_mf_network(blender::nodes::NodeMFNetworkBuilder &builder)
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc
index c8cfcb1c24f..6450785292b 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_math.cc
@@ -104,8 +104,7 @@ static bool operation_use_input_b(const NodeMathOperation operation)
case NODE_MATH_TRUNC:
return false;
}
- BLI_assert(false);
- return false;
+ BLI_UNREACHABLE_ABORT;
}
static void geo_node_attribute_math_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
diff --git a/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc b/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc
index aa207860f32..5403396fbc0 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_attribute_vector_math.cc
@@ -138,9 +138,7 @@ static CustomDataType operation_get_result_type(const NodeVectorMathOperation op
case NODE_VECTOR_MATH_LENGTH:
return CD_PROP_FLOAT;
}
-
- BLI_assert(false);
- return CD_PROP_FLOAT3;
+ BLI_UNREACHABLE_ABORT;
}
namespace blender::nodes {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc
index 6d286a9d583..d19da9ff09e 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_circle.cc
@@ -67,8 +67,7 @@ static int circle_vert_total(const GeometryNodeMeshCircleFillType fill_type, con
case GEO_NODE_MESH_CIRCLE_FILL_TRIANGLE_FAN:
return verts_num + 1;
}
- BLI_assert(false);
- return 0;
+ BLI_UNREACHABLE_ABORT;
}
static int circle_edge_total(const GeometryNodeMeshCircleFillType fill_type, const int verts_num)
@@ -80,8 +79,7 @@ static int circle_edge_total(const GeometryNodeMeshCircleFillType fill_type, con
case GEO_NODE_MESH_CIRCLE_FILL_TRIANGLE_FAN:
return verts_num * 2;
}
- BLI_assert(false);
- return 0;
+ BLI_UNREACHABLE_ABORT;
}
static int circle_corner_total(const GeometryNodeMeshCircleFillType fill_type, const int verts_num)
@@ -94,8 +92,7 @@ static int circle_corner_total(const GeometryNodeMeshCircleFillType fill_type, c
case GEO_NODE_MESH_CIRCLE_FILL_TRIANGLE_FAN:
return verts_num * 3;
}
- BLI_assert(false);
- return 0;
+ BLI_UNREACHABLE_ABORT;
}
static int circle_face_total(const GeometryNodeMeshCircleFillType fill_type, const int verts_num)
@@ -108,8 +105,7 @@ static int circle_face_total(const GeometryNodeMeshCircleFillType fill_type, con
case GEO_NODE_MESH_CIRCLE_FILL_TRIANGLE_FAN:
return verts_num;
}
- BLI_assert(false);
- return 0;
+ BLI_UNREACHABLE_ABORT;
}
static Mesh *create_circle_mesh(const float radius,
diff --git a/source/blender/nodes/intern/node_geometry_exec.cc b/source/blender/nodes/intern/node_geometry_exec.cc
index a4fb99a988e..ea973e7bdd6 100644
--- a/source/blender/nodes/intern/node_geometry_exec.cc
+++ b/source/blender/nodes/intern/node_geometry_exec.cc
@@ -97,8 +97,7 @@ ReadAttributePtr GeoNodeExecParams::get_input_attribute(const StringRef name,
return component.attribute_get_constant_for_read_converted(
domain, CD_PROP_COLOR, type, &value);
}
- BLI_assert(false);
- return component.attribute_get_constant_for_read(domain, type, default_value);
+ BLI_UNREACHABLE_ABORT;
}
CustomDataType GeoNodeExecParams::get_input_attribute_data_type(
@@ -133,8 +132,7 @@ CustomDataType GeoNodeExecParams::get_input_attribute_data_type(
return CD_PROP_BOOL;
}
- BLI_assert(false);
- return default_type;
+ BLI_UNREACHABLE_ABORT;
}
/**
diff --git a/source/blender/nodes/intern/node_tree_ref.cc b/source/blender/nodes/intern/node_tree_ref.cc
index 3735cfe3247..46a84e7f2e3 100644
--- a/source/blender/nodes/intern/node_tree_ref.cc
+++ b/source/blender/nodes/intern/node_tree_ref.cc
@@ -141,8 +141,7 @@ InputSocketRef &NodeTreeRef::find_input_socket(Map<bNode *, NodeRef *> &node_map
return *socket;
}
}
- BLI_assert(false);
- return *node->inputs_[0];
+ BLI_UNREACHABLE_ABORT;
}
OutputSocketRef &NodeTreeRef::find_output_socket(Map<bNode *, NodeRef *> &node_mapping,
@@ -155,8 +154,7 @@ OutputSocketRef &NodeTreeRef::find_output_socket(Map<bNode *, NodeRef *> &node_m
return *socket;
}
}
- BLI_assert(false);
- return *node->outputs_[0];
+ BLI_UNREACHABLE_ABORT;
}
void NodeTreeRef::create_linked_socket_caches()
diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_math.cc b/source/blender/nodes/shader/nodes/node_shader_vector_math.cc
index e8396c7cfc1..1aa8f8cba2e 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vector_math.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vector_math.cc
@@ -265,8 +265,7 @@ static const blender::fn::MultiFunction &get_multi_function(
}
default:
- BLI_assert(false);
- return builder.get_not_implemented_fn();
+ BLI_UNREACHABLE_ABORT;
};
}
diff --git a/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc b/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
index 30b043439b8..b3406689622 100644
--- a/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
+++ b/source/blender/nodes/shader/nodes/node_shader_vector_rotate.cc
@@ -181,8 +181,7 @@ static const blender::fn::MultiFunction &get_multi_function(
return fn;
}
default:
- BLI_assert(false);
- return builder.get_not_implemented_fn();
+ BLI_UNREACHABLE_ABORT;
}
}