[Bf-blender-cvs] [dea5d22da10] blender-v3.2-release: Cleanup: remove warnings due to maybe-used variables

Jacques Lucke noreply at git.blender.org
Thu May 12 13:38:32 CEST 2022


Commit: dea5d22da1030860a2ab78b528029eb7c49d995d
Author: Jacques Lucke
Date:   Thu May 12 13:03:12 2022 +0200
Branches: blender-v3.2-release
https://developer.blender.org/rBdea5d22da1030860a2ab78b528029eb7c49d995d

Cleanup: remove warnings due to maybe-used variables

The variable was only used in some constexpr if-statements.

===================================================================

M	source/blender/functions/FN_multi_function_builder.hh

===================================================================

diff --git a/source/blender/functions/FN_multi_function_builder.hh b/source/blender/functions/FN_multi_function_builder.hh
index a35339b2495..dc91c9ee47c 100644
--- a/source/blender/functions/FN_multi_function_builder.hh
+++ b/source/blender/functions/FN_multi_function_builder.hh
@@ -209,7 +209,7 @@ void execute_materialized(TypeSequence<ParamTags...> /* param_tags */,
       [&] {
         using ParamTag = ParamTags;
         using T = typename ParamTag::base_type;
-        ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
+        [[maybe_unused]] ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
         if constexpr (ParamTag::category == MFParamCategory::SingleInput) {
           VArray<T> &varray = *args;
           if (varray.is_single()) {
@@ -246,7 +246,7 @@ void execute_materialized(TypeSequence<ParamTags...> /* param_tags */,
         [&] {
           using ParamTag = ParamTags;
           using T = typename ParamTag::base_type;
-          ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
+          [[maybe_unused]] ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
           if constexpr (ParamTag::category == MFParamCategory::SingleInput) {
             if (arg_info.mode == ArgMode::Single) {
               /* The single value has been filled into a buffer already reused for every chunk. */
@@ -284,7 +284,7 @@ void execute_materialized(TypeSequence<ParamTags...> /* param_tags */,
         [&] {
           using ParamTag = ParamTags;
           using T = typename ParamTag::base_type;
-          ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
+          [[maybe_unused]] ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
           if constexpr (ParamTag::category == MFParamCategory::SingleInput) {
             if (arg_info.mode == ArgMode::Materialized) {
               T *in_chunk = std::get<I>(buffers_owner).ptr();
@@ -300,7 +300,7 @@ void execute_materialized(TypeSequence<ParamTags...> /* param_tags */,
       [&] {
         using ParamTag = ParamTags;
         using T = typename ParamTag::base_type;
-        ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
+        [[maybe_unused]] ArgInfo<ParamTags> &arg_info = std::get<I>(args_info);
         if constexpr (ParamTag::category == MFParamCategory::SingleInput) {
           if (arg_info.mode == ArgMode::Single) {
             MutableSpan<T> in_chunk = std::get<I>(buffers);



More information about the Bf-blender-cvs mailing list