[Bf-blender-cvs] [e8102aea13f] master: Cleanup: fix warning due to unused variable
Jacques Lucke
noreply at git.blender.org
Thu Apr 28 12:22:12 CEST 2022
Commit: e8102aea13f510daa114eadee754803c380736a9
Author: Jacques Lucke
Date: Thu Apr 28 12:21:39 2022 +0200
Branches: master
https://developer.blender.org/rBe8102aea13f510daa114eadee754803c380736a9
Cleanup: fix warning due to unused variable
This warning exists in gcc 9.4.0, apparently because the variable
is not used in some `constexpr` code paths.
===================================================================
M source/blender/blenlib/BLI_devirtualize_parameters.hh
===================================================================
diff --git a/source/blender/blenlib/BLI_devirtualize_parameters.hh b/source/blender/blenlib/BLI_devirtualize_parameters.hh
index 07458906756..77b6223f310 100644
--- a/source/blender/blenlib/BLI_devirtualize_parameters.hh
+++ b/source/blender/blenlib/BLI_devirtualize_parameters.hh
@@ -154,7 +154,8 @@ template<typename Fn, typename... SourceTypes> class Devirtualizer {
/* Non-devirtualized parameter type. */
using SourceType = type_at_index<I>;
/* A bit flag indicating what devirtualizations are allowed in this step. */
- constexpr DeviMode allowed_modes = DeviModeSequence<AllowedModes...>::template at_index<I>();
+ [[maybe_unused]] constexpr DeviMode allowed_modes =
+ DeviModeSequence<AllowedModes...>::template at_index<I>();
/* Handle #VArray types. */
if constexpr (is_VArray_v<SourceType>) {
More information about the Bf-blender-cvs
mailing list