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:
authorHans Goudey <h.goudey@me.com>2021-10-12 17:13:21 +0300
committerHans Goudey <h.goudey@me.com>2021-10-12 17:13:21 +0300
commitc1a1644db7b13425675819eeea9ef96bab4f5c97 (patch)
tree44b633870231c36c87b070fa4c3d922e8999d7df
parent30cd1d10a95a5e32b9e0daf1a24c41123f262c96 (diff)
Cleanup: Attempt to fix benign macOS compile warnings
-rw-r--r--source/blender/modifiers/intern/MOD_nodes_evaluator.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/legacy/node_geo_curve_endpoints.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/legacy/node_geo_curve_to_points.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc6
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc4
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_proximity.cc2
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc4
-rw-r--r--source/blender/nodes/intern/node_common.cc2
8 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
index 8209d46ec24..a85fc29430f 100644
--- a/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
+++ b/source/blender/modifiers/intern/MOD_nodes_evaluator.cc
@@ -1108,7 +1108,7 @@ class GeometryNodesEvaluator {
return;
}
bool will_be_triggered_by_other_node = false;
- for (const DSocket origin_socket : origin_sockets) {
+ for (const DSocket &origin_socket : origin_sockets) {
if (origin_socket->is_input()) {
/* Load the value directly from the origin socket. In most cases this is an unlinked
* group input. */
diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_curve_endpoints.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_curve_endpoints.cc
index 65d22eca39c..b226cc2d3be 100644
--- a/source/blender/nodes/geometry/nodes/legacy/node_geo_curve_endpoints.cc
+++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_curve_endpoints.cc
@@ -124,7 +124,7 @@ static void copy_endpoint_attributes(Span<SplinePtr> splines,
end_data.tilts[i] = spline.tilts().last();
/* Copy the point attribute data over. */
- for (const auto &item : start_data.point_attributes.items()) {
+ for (const auto item : start_data.point_attributes.items()) {
const AttributeIDRef attribute_id = item.key;
GMutableSpan point_span = item.value;
@@ -133,7 +133,7 @@ static void copy_endpoint_attributes(Span<SplinePtr> splines,
blender::fn::GVArray_For_GSpan(spline_span).get(0, point_span[i]);
}
- for (const auto &item : end_data.point_attributes.items()) {
+ for (const auto item : end_data.point_attributes.items()) {
const AttributeIDRef attribute_id = item.key;
GMutableSpan point_span = item.value;
diff --git a/source/blender/nodes/geometry/nodes/legacy/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/legacy/node_geo_curve_to_points.cc
index 0c435d69991..b6409290f31 100644
--- a/source/blender/nodes/geometry/nodes/legacy/node_geo_curve_to_points.cc
+++ b/source/blender/nodes/geometry/nodes/legacy/node_geo_curve_to_points.cc
@@ -180,7 +180,7 @@ static void copy_evaluated_point_attributes(Span<SplinePtr> splines,
spline.interpolate_to_evaluated(spline.radii())->materialize(data.radii.slice(offset, size));
spline.interpolate_to_evaluated(spline.tilts())->materialize(data.tilts.slice(offset, size));
- for (const Map<AttributeIDRef, GMutableSpan>::Item &item : data.point_attributes.items()) {
+ for (const Map<AttributeIDRef, GMutableSpan>::Item item : data.point_attributes.items()) {
const AttributeIDRef attribute_id = item.key;
GMutableSpan point_span = item.value;
@@ -223,7 +223,7 @@ static void copy_uniform_sample_point_attributes(Span<SplinePtr> splines,
uniform_samples,
data.tilts.slice(offset, size));
- for (const Map<AttributeIDRef, GMutableSpan>::Item &item : data.point_attributes.items()) {
+ for (const Map<AttributeIDRef, GMutableSpan>::Item item : data.point_attributes.items()) {
const AttributeIDRef attribute_id = item.key;
GMutableSpan point_span = item.value;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
index fc9cba73b01..33f8c53e343 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_delete_geometry.cc
@@ -923,10 +923,10 @@ static void do_mesh_separation(GeometrySet &geometry_set,
switch (mode) {
case GEO_NODE_DELETE_GEOMETRY_MODE_ALL: {
Array<int> vertex_map(mesh_in.totvert);
- int num_selected_vertices;
+ int num_selected_vertices = 0;
Array<int> edge_map(mesh_in.totedge);
- int num_selected_edges;
+ int num_selected_edges = 0;
/* Fill all the maps based on the selection. */
switch (domain) {
@@ -990,7 +990,7 @@ static void do_mesh_separation(GeometrySet &geometry_set,
}
case GEO_NODE_DELETE_GEOMETRY_MODE_EDGE_FACE: {
Array<int> edge_map(mesh_in.totedge);
- int num_selected_edges;
+ int num_selected_edges = 0;
/* Fill all the maps based on the selection. */
switch (domain) {
diff --git a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
index 3e9b615f478..b628c5cbab8 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
@@ -209,7 +209,7 @@ static void join_attributes(Span<const GeometryComponent *> src_components,
const Map<AttributeIDRef, AttributeMetaData> info = get_final_attribute_info(src_components,
ignored_attributes);
- for (const Map<AttributeIDRef, AttributeMetaData>::Item &item : info.items()) {
+ for (const Map<AttributeIDRef, AttributeMetaData>::Item item : info.items()) {
const AttributeIDRef attribute_id = item.key;
const AttributeMetaData &meta_data = item.value;
@@ -399,7 +399,7 @@ static void join_curve_attributes(const Map<AttributeIDRef, AttributeMetaData> &
Span<CurveComponent *> src_components,
CurveEval &result)
{
- for (const Map<AttributeIDRef, AttributeMetaData>::Item &item : info.items()) {
+ for (const Map<AttributeIDRef, AttributeMetaData>::Item item : info.items()) {
const AttributeIDRef attribute_id = item.key;
const AttributeMetaData meta_data = item.value;
diff --git a/source/blender/nodes/geometry/nodes/node_geo_proximity.cc b/source/blender/nodes/geometry/nodes/node_geo_proximity.cc
index 7062deff2f1..9f357ce2b1c 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_proximity.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_proximity.cc
@@ -201,7 +201,7 @@ static void geo_node_proximity_exec(GeoNodeExecParams params)
if (!geometry_set_target.has_mesh() && !geometry_set_target.has_pointcloud()) {
params.set_output("Position", fn::make_constant_field<float3>({0.0f, 0.0f, 0.0f}));
- params.set_output("Distance", fn::make_constant_field<float>({0.0f}));
+ params.set_output("Distance", fn::make_constant_field<float>(0.0f));
return;
}
diff --git a/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc b/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc
index 3eec2279f24..1cb6d43f685 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_string_to_curves.cc
@@ -136,7 +136,7 @@ static TextLayout get_text_layout(GeoNodeExecParams &params)
params.extract_input<float>("Text Box Height");
VFont *vfont = (VFont *)params.node().id;
- Curve cu = {nullptr};
+ Curve cu = {{nullptr}};
cu.type = OB_FONT;
/* Set defaults */
cu.resolu = 12;
@@ -214,7 +214,7 @@ static Map<int, int> create_curve_instances(GeoNodeExecParams &params,
if (handles.contains(charcodes[i])) {
continue;
}
- Curve cu = {nullptr};
+ Curve cu = {{nullptr}};
cu.type = OB_FONT;
cu.resolu = 12;
cu.vfont = vfont;
diff --git a/source/blender/nodes/intern/node_common.cc b/source/blender/nodes/intern/node_common.cc
index f5e6e7640ad..e5ec50858d9 100644
--- a/source/blender/nodes/intern/node_common.cc
+++ b/source/blender/nodes/intern/node_common.cc
@@ -372,7 +372,7 @@ void ntree_update_reroute_nodes(bNodeTree *ntree)
}
/* Actually update reroute nodes with changed types. */
- for (const auto &item : reroute_types.items()) {
+ for (const auto item : reroute_types.items()) {
bNode *reroute_node = item.key;
const bNodeSocketType *socket_type = item.value;
bNodeSocket *input_socket = (bNodeSocket *)reroute_node->inputs.first;