From 0d0d7efbd4539547bd1af360864a7aac14c7f973 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Del=20Pino?= <stephane.delpino44@gmail.com>
Date: Mon, 26 Jul 2021 14:23:30 +0200
Subject: [PATCH] Fix weird warning in acoustic solver (gcc debug)

---
 src/scheme/AcousticSolver.cpp | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/scheme/AcousticSolver.cpp b/src/scheme/AcousticSolver.cpp
index 5b4d9cb57..e5171badb 100644
--- a/src/scheme/AcousticSolver.cpp
+++ b/src/scheme/AcousticSolver.cpp
@@ -241,14 +241,6 @@ class AcousticSolverHandler::AcousticSolver final : public AcousticSolverHandler
   {
     BoundaryConditionList bc_list;
 
-    constexpr ItemType FaceType = [] {
-      if constexpr (Dimension > 1) {
-        return ItemType::face;
-      } else {
-        return ItemType::node;
-      }
-    }();
-
     for (const auto& bc_descriptor : bc_descriptor_list) {
       bool is_valid_boundary_condition = true;
 
@@ -288,6 +280,14 @@ class AcousticSolverHandler::AcousticSolver final : public AcousticSolverHandler
 
             bc_list.emplace_back(PressureBoundaryCondition{mesh_node_boundary, node_values});
           } else {
+            constexpr ItemType FaceType = [] {
+              if constexpr (Dimension > 1) {
+                return ItemType::face;
+              } else {
+                return ItemType::node;
+              }
+            }();
+
             MeshFaceBoundary<Dimension> mesh_face_boundary =
               getMeshFaceBoundary(mesh, bc_descriptor->boundaryDescriptor());
 
-- 
GitLab