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>2022-10-04 01:37:25 +0300
committerHans Goudey <h.goudey@me.com>2022-10-04 01:38:16 +0300
commit97746129d5870beedc40e3c035c7982ce8a6bebc (patch)
treeb819b8e7875e6684aad7ea1f6bb7922d4fa1c8fc /source/blender/nodes/function
parented7f5713f8f9d605e3cd4cce42e40fb5c6bf4bf5 (diff)
Cleanup: replace UNUSED macro with commented args in C++ code
This is the conventional way of dealing with unused arguments in C++, since it works on all compilers. Regex find and replace: `UNUSED\((\w+)\)` -> `/*$1*/`
Diffstat (limited to 'source/blender/nodes/function')
-rw-r--r--source/blender/nodes/function/node_function_util.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_align_euler_to_vector.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_boolean_math.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_combine_color.cc6
-rw-r--r--source/blender/nodes/function/nodes/node_fn_compare.cc6
-rw-r--r--source/blender/nodes/function/nodes/node_fn_float_to_int.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_bool.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_color.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_int.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_special_characters.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_string.cc8
-rw-r--r--source/blender/nodes/function/nodes/node_fn_input_vector.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_random_value.cc4
-rw-r--r--source/blender/nodes/function/nodes/node_fn_rotate_euler.cc2
-rw-r--r--source/blender/nodes/function/nodes/node_fn_separate_color.cc12
15 files changed, 34 insertions, 36 deletions
diff --git a/source/blender/nodes/function/node_function_util.cc b/source/blender/nodes/function/node_function_util.cc
index d956f91a91d..82459815b77 100644
--- a/source/blender/nodes/function/node_function_util.cc
+++ b/source/blender/nodes/function/node_function_util.cc
@@ -5,7 +5,7 @@
#include "NOD_socket_search_link.hh"
-static bool fn_node_poll_default(bNodeType *UNUSED(ntype),
+static bool fn_node_poll_default(bNodeType * /*ntype*/,
bNodeTree *ntree,
const char **r_disabled_hint)
{
diff --git a/source/blender/nodes/function/nodes/node_fn_align_euler_to_vector.cc b/source/blender/nodes/function/nodes/node_fn_align_euler_to_vector.cc
index e5c89567d44..9e21fc86871 100644
--- a/source/blender/nodes/function/nodes/node_fn_align_euler_to_vector.cc
+++ b/source/blender/nodes/function/nodes/node_fn_align_euler_to_vector.cc
@@ -26,7 +26,7 @@ static void fn_node_align_euler_to_vector_declare(NodeDeclarationBuilder &b)
}
static void fn_node_align_euler_to_vector_layout(uiLayout *layout,
- bContext *UNUSED(C),
+ bContext * /*C*/,
PointerRNA *ptr)
{
uiItemR(layout, ptr, "axis", UI_ITEM_R_EXPAND, nullptr, ICON_NONE);
@@ -159,7 +159,7 @@ class MF_AlignEulerToVector : public fn::MultiFunction {
return signature.build();
}
- void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override
+ void call(IndexMask mask, fn::MFParams params, fn::MFContext /*context*/) const override
{
const VArray<float3> &input_rotations = params.readonly_single_input<float3>(0, "Rotation");
const VArray<float> &factors = params.readonly_single_input<float>(1, "Factor");
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 5fc28509a49..7fc7829186a 100644
--- a/source/blender/nodes/function/nodes/node_fn_boolean_math.cc
+++ b/source/blender/nodes/function/nodes/node_fn_boolean_math.cc
@@ -22,7 +22,7 @@ static void fn_node_boolean_math_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Bool>(N_("Boolean"));
}
-static void fn_node_boolean_math_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_boolean_math_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "operation", 0, "", ICON_NONE);
}
@@ -34,7 +34,7 @@ static void node_boolean_math_update(bNodeTree *ntree, bNode *node)
nodeSetSocketAvailability(ntree, sockB, !ELEM(node->custom1, NODE_BOOLEAN_MATH_NOT));
}
-static void node_boolean_math_label(const bNodeTree *UNUSED(ntree),
+static void node_boolean_math_label(const bNodeTree * /*tree*/,
const bNode *node,
char *label,
int maxlen)
diff --git a/source/blender/nodes/function/nodes/node_fn_combine_color.cc b/source/blender/nodes/function/nodes/node_fn_combine_color.cc
index 450cd166e78..fddf606dfc9 100644
--- a/source/blender/nodes/function/nodes/node_fn_combine_color.cc
+++ b/source/blender/nodes/function/nodes/node_fn_combine_color.cc
@@ -31,18 +31,18 @@ static void fn_node_combine_color_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>(N_("Color"));
};
-static void fn_node_combine_color_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_combine_color_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "mode", 0, "", ICON_NONE);
}
-static void fn_node_combine_color_update(bNodeTree *UNUSED(ntree), bNode *node)
+static void fn_node_combine_color_update(bNodeTree * /*tree*/, bNode *node)
{
const NodeCombSepColor &storage = node_storage(*node);
node_combsep_color_label(&node->inputs, (NodeCombSepColorMode)storage.mode);
}
-static void fn_node_combine_color_init(bNodeTree *UNUSED(tree), bNode *node)
+static void fn_node_combine_color_init(bNodeTree * /*tree*/, bNode *node)
{
NodeCombSepColor *data = MEM_cnew<NodeCombSepColor>(__func__);
data->mode = NODE_COMBSEP_COLOR_RGB;
diff --git a/source/blender/nodes/function/nodes/node_fn_compare.cc b/source/blender/nodes/function/nodes/node_fn_compare.cc
index 122d1a3c93e..4dd8d0c6ba4 100644
--- a/source/blender/nodes/function/nodes/node_fn_compare.cc
+++ b/source/blender/nodes/function/nodes/node_fn_compare.cc
@@ -44,7 +44,7 @@ static void fn_node_compare_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Bool>(N_("Result"));
}
-static void geo_node_compare_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void geo_node_compare_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
const NodeFunctionCompare &data = node_storage(*static_cast<const bNode *>(ptr->data));
uiItemR(layout, ptr, "data_type", 0, "", ICON_NONE);
@@ -82,7 +82,7 @@ static void node_compare_update(bNodeTree *ntree, bNode *node)
data->data_type == SOCK_VECTOR);
}
-static void node_compare_init(bNodeTree *UNUSED(tree), bNode *node)
+static void node_compare_init(bNodeTree * /*tree*/, bNode *node)
{
NodeFunctionCompare *data = MEM_cnew<NodeFunctionCompare>(__func__);
data->operation = NODE_COMPARE_GREATER_THAN;
@@ -148,7 +148,7 @@ static void node_compare_gather_link_searches(GatherLinkSearchOpParams &params)
}
}
-static void node_compare_label(const bNodeTree *UNUSED(ntree),
+static void node_compare_label(const bNodeTree * /*tree*/,
const bNode *node,
char *label,
int maxlen)
diff --git a/source/blender/nodes/function/nodes/node_fn_float_to_int.cc b/source/blender/nodes/function/nodes/node_fn_float_to_int.cc
index 452768208c5..aa039309b3f 100644
--- a/source/blender/nodes/function/nodes/node_fn_float_to_int.cc
+++ b/source/blender/nodes/function/nodes/node_fn_float_to_int.cc
@@ -21,12 +21,12 @@ static void fn_node_float_to_int_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Int>(N_("Integer"));
}
-static void fn_node_float_to_int_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_float_to_int_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "rounding_mode", 0, "", ICON_NONE);
}
-static void node_float_to_int_label(const bNodeTree *UNUSED(ntree),
+static void node_float_to_int_label(const bNodeTree * /*tree*/,
const bNode *node,
char *label,
int maxlen)
diff --git a/source/blender/nodes/function/nodes/node_fn_input_bool.cc b/source/blender/nodes/function/nodes/node_fn_input_bool.cc
index 717f4d1ac6b..c68de06a91b 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_bool.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_bool.cc
@@ -14,7 +14,7 @@ static void fn_node_input_bool_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Bool>(N_("Boolean"));
}
-static void fn_node_input_bool_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_input_bool_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiLayout *col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "boolean", UI_ITEM_R_EXPAND, IFACE_("Value"), ICON_NONE);
@@ -27,7 +27,7 @@ static void fn_node_input_bool_build_multi_function(NodeMultiFunctionBuilder &bu
builder.construct_and_set_matching_fn<fn::CustomMF_Constant<bool>>(node_storage->boolean);
}
-static void fn_node_input_bool_init(bNodeTree *UNUSED(ntree), bNode *node)
+static void fn_node_input_bool_init(bNodeTree * /*tree*/, bNode *node)
{
NodeInputBool *data = MEM_cnew<NodeInputBool>(__func__);
node->storage = data;
diff --git a/source/blender/nodes/function/nodes/node_fn_input_color.cc b/source/blender/nodes/function/nodes/node_fn_input_color.cc
index cdad1542c66..9a66066189a 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_color.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_color.cc
@@ -14,7 +14,7 @@ static void fn_node_input_color_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>(N_("Color"));
}
-static void fn_node_input_color_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_input_color_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiTemplateColorPicker(layout, ptr, "color", true, false, false, true);
uiItemR(layout, ptr, "color", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
@@ -29,7 +29,7 @@ static void fn_node_input_color_build_multi_function(
builder.construct_and_set_matching_fn<blender::fn::CustomMF_Constant<ColorGeometry4f>>(color);
}
-static void fn_node_input_color_init(bNodeTree *UNUSED(ntree), bNode *node)
+static void fn_node_input_color_init(bNodeTree * /*tree*/, bNode *node)
{
NodeInputColor *data = MEM_cnew<NodeInputColor>(__func__);
copy_v4_fl4(data->color, 0.5f, 0.5f, 0.5f, 1.0f);
diff --git a/source/blender/nodes/function/nodes/node_fn_input_int.cc b/source/blender/nodes/function/nodes/node_fn_input_int.cc
index 16506b5f9b8..5285c242d88 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_int.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_int.cc
@@ -14,7 +14,7 @@ static void fn_node_input_int_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Int>(N_("Integer"));
}
-static void fn_node_input_int_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_input_int_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiLayout *col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "integer", UI_ITEM_R_EXPAND, "", ICON_NONE);
@@ -27,7 +27,7 @@ static void fn_node_input_int_build_multi_function(NodeMultiFunctionBuilder &bui
builder.construct_and_set_matching_fn<fn::CustomMF_Constant<int>>(node_storage->integer);
}
-static void fn_node_input_int_init(bNodeTree *UNUSED(ntree), bNode *node)
+static void fn_node_input_int_init(bNodeTree * /*tree*/, bNode *node)
{
NodeInputInt *data = MEM_cnew<NodeInputInt>(__func__);
node->storage = data;
diff --git a/source/blender/nodes/function/nodes/node_fn_input_special_characters.cc b/source/blender/nodes/function/nodes/node_fn_input_special_characters.cc
index 88dc95aa026..b61bd6b5e22 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_special_characters.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_special_characters.cc
@@ -26,7 +26,7 @@ class MF_SpecialCharacters : public fn::MultiFunction {
return signature.build();
}
- void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override
+ void call(IndexMask mask, fn::MFParams params, fn::MFContext /*context*/) const override
{
MutableSpan<std::string> lb = params.uninitialized_single_output<std::string>(0, "Line Break");
MutableSpan<std::string> tab = params.uninitialized_single_output<std::string>(1, "Tab");
diff --git a/source/blender/nodes/function/nodes/node_fn_input_string.cc b/source/blender/nodes/function/nodes/node_fn_input_string.cc
index 129d19f4f04..a7172d9fcf9 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_string.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_string.cc
@@ -13,7 +13,7 @@ static void fn_node_input_string_declare(NodeDeclarationBuilder &b)
b.add_output<decl::String>(N_("String"));
}
-static void fn_node_input_string_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_input_string_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "string", 0, "", ICON_NONE);
}
@@ -26,7 +26,7 @@ static void fn_node_input_string_build_multi_function(NodeMultiFunctionBuilder &
builder.construct_and_set_matching_fn<fn::CustomMF_Constant<std::string>>(std::move(string));
}
-static void fn_node_input_string_init(bNodeTree *UNUSED(ntree), bNode *node)
+static void fn_node_input_string_init(bNodeTree * /*tree*/, bNode *node)
{
node->storage = MEM_callocN(sizeof(NodeInputString), __func__);
}
@@ -43,9 +43,7 @@ static void fn_node_input_string_free(bNode *node)
MEM_freeN(storage);
}
-static void fn_node_string_copy(bNodeTree *UNUSED(dest_ntree),
- bNode *dest_node,
- const bNode *src_node)
+static void fn_node_string_copy(bNodeTree * /*dst_ntree*/, bNode *dest_node, const bNode *src_node)
{
NodeInputString *source_storage = (NodeInputString *)src_node->storage;
NodeInputString *destination_storage = (NodeInputString *)MEM_dupallocN(source_storage);
diff --git a/source/blender/nodes/function/nodes/node_fn_input_vector.cc b/source/blender/nodes/function/nodes/node_fn_input_vector.cc
index de894a4038d..49c8a6284e0 100644
--- a/source/blender/nodes/function/nodes/node_fn_input_vector.cc
+++ b/source/blender/nodes/function/nodes/node_fn_input_vector.cc
@@ -14,7 +14,7 @@ static void fn_node_input_vector_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Vector>(N_("Vector"));
}
-static void fn_node_input_vector_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_input_vector_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiLayout *col = uiLayoutColumn(layout, true);
uiItemR(col, ptr, "vector", UI_ITEM_R_EXPAND, "", ICON_NONE);
@@ -28,7 +28,7 @@ static void fn_node_input_vector_build_multi_function(NodeMultiFunctionBuilder &
builder.construct_and_set_matching_fn<fn::CustomMF_Constant<float3>>(vector);
}
-static void fn_node_input_vector_init(bNodeTree *UNUSED(ntree), bNode *node)
+static void fn_node_input_vector_init(bNodeTree * /*tree*/, bNode *node)
{
NodeInputVector *data = MEM_cnew<NodeInputVector>(__func__);
node->storage = data;
diff --git a/source/blender/nodes/function/nodes/node_fn_random_value.cc b/source/blender/nodes/function/nodes/node_fn_random_value.cc
index 341a3fbfa75..9f842e81071 100644
--- a/source/blender/nodes/function/nodes/node_fn_random_value.cc
+++ b/source/blender/nodes/function/nodes/node_fn_random_value.cc
@@ -42,12 +42,12 @@ static void fn_node_random_value_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Bool>(N_("Value"), "Value_003").dependent_field();
}
-static void fn_node_random_value_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_random_value_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "data_type", 0, "", ICON_NONE);
}
-static void fn_node_random_value_init(bNodeTree *UNUSED(tree), bNode *node)
+static void fn_node_random_value_init(bNodeTree * /*tree*/, bNode *node)
{
NodeRandomValue *data = MEM_cnew<NodeRandomValue>(__func__);
data->data_type = CD_PROP_FLOAT;
diff --git a/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc b/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
index 299c0f7a932..813d0a265f7 100644
--- a/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
+++ b/source/blender/nodes/function/nodes/node_fn_rotate_euler.cc
@@ -46,7 +46,7 @@ static void fn_node_rotate_euler_update(bNodeTree *ntree, bNode *node)
ntree, angle_socket, ELEM(node->custom1, FN_NODE_ROTATE_EULER_TYPE_AXIS_ANGLE));
}
-static void fn_node_rotate_euler_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_rotate_euler_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "type", UI_ITEM_R_EXPAND, nullptr, ICON_NONE);
uiItemR(layout, ptr, "space", UI_ITEM_R_EXPAND, nullptr, ICON_NONE);
diff --git a/source/blender/nodes/function/nodes/node_fn_separate_color.cc b/source/blender/nodes/function/nodes/node_fn_separate_color.cc
index 19613427835..19753f93b5c 100644
--- a/source/blender/nodes/function/nodes/node_fn_separate_color.cc
+++ b/source/blender/nodes/function/nodes/node_fn_separate_color.cc
@@ -19,18 +19,18 @@ static void fn_node_separate_color_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>(N_("Alpha"));
};
-static void fn_node_separate_color_layout(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+static void fn_node_separate_color_layout(uiLayout *layout, bContext * /*C*/, PointerRNA *ptr)
{
uiItemR(layout, ptr, "mode", 0, "", ICON_NONE);
}
-static void fn_node_separate_color_update(bNodeTree *UNUSED(ntree), bNode *node)
+static void fn_node_separate_color_update(bNodeTree * /*tree*/, bNode *node)
{
const NodeCombSepColor &storage = node_storage(*node);
node_combsep_color_label(&node->outputs, (NodeCombSepColorMode)storage.mode);
}
-static void fn_node_separate_color_init(bNodeTree *UNUSED(tree), bNode *node)
+static void fn_node_separate_color_init(bNodeTree * /*tree*/, bNode *node)
{
NodeCombSepColor *data = MEM_cnew<NodeCombSepColor>(__func__);
data->mode = NODE_COMBSEP_COLOR_RGB;
@@ -56,7 +56,7 @@ class SeparateRGBAFunction : public fn::MultiFunction {
return signature.build();
}
- void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override
+ void call(IndexMask mask, fn::MFParams params, fn::MFContext /*context*/) const override
{
const VArray<ColorGeometry4f> &colors = params.readonly_single_input<ColorGeometry4f>(0,
"Color");
@@ -117,7 +117,7 @@ class SeparateHSVAFunction : public fn::MultiFunction {
return signature.build();
}
- void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override
+ void call(IndexMask mask, fn::MFParams params, fn::MFContext /*context*/) const override
{
const VArray<ColorGeometry4f> &colors = params.readonly_single_input<ColorGeometry4f>(0,
"Color");
@@ -157,7 +157,7 @@ class SeparateHSLAFunction : public fn::MultiFunction {
return signature.build();
}
- void call(IndexMask mask, fn::MFParams params, fn::MFContext UNUSED(context)) const override
+ void call(IndexMask mask, fn::MFParams params, fn::MFContext /*context*/) const override
{
const VArray<ColorGeometry4f> &colors = params.readonly_single_input<ColorGeometry4f>(0,
"Color");