From a9603c09dc8688ae6022c342497e891903e6f280 Mon Sep 17 00:00:00 2001
From: Nils Kohl <nils.kohl@fau.de>
Date: Thu, 4 Apr 2019 13:18:52 +0200
Subject: [PATCH] Fixed wrong usage of optional

---
 src/mesh/blockforest/RefinementSelection.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesh/blockforest/RefinementSelection.h b/src/mesh/blockforest/RefinementSelection.h
index 4c2977354..1055d203f 100644
--- a/src/mesh/blockforest/RefinementSelection.h
+++ b/src/mesh/blockforest/RefinementSelection.h
@@ -103,7 +103,7 @@ inline void walberla::mesh::RefinementSelection<DistanceObject>::operator()( blo
          continue;
 
       walberla::optional< bool > intersects = intersectsSurface( *distanceObject_, blocks[ shuffle[ii] ]->getAABB(), maxError_, distance_ );
-      if( intersects.value_or( true ) )
+      if( !intersects || intersects.value() )
          refine[ shuffle[ ii ] ] = uint8_t( 1 );
    }
 
-- 
GitLab