diff --git a/src/blockforest/BlockForest.cpp b/src/blockforest/BlockForest.cpp
index 3455df9e6f0ae559ec6e660117a12ae45a48b817..3137ee19a1687e766d71a40d825dbefbcf069c3d 100644
--- a/src/blockforest/BlockForest.cpp
+++ b/src/blockforest/BlockForest.cpp
@@ -1877,10 +1877,10 @@ bool BlockForest::determineBlockTargetLevels( bool & additionalRefreshCycleRequi
 
       WALBERLA_LOG_PROGRESS( "BlockForest refresh:   + tell neighbors about blocks that can get merged" );
 
-      for( auto rank = ranksToRecvFrom.begin(); rank != ranksToRecvFrom.end(); ++rank )
+      for( auto rank: ranksToRecvFrom )
       {
-         WALBERLA_ASSERT_UNEQUAL( *rank, process_ );
-         mergeBufferSystem.sendBuffer( *rank ) << intentToMerge[ process_ ];
+         WALBERLA_ASSERT_UNEQUAL( rank, process_ );
+         mergeBufferSystem.sendBuffer( rank ) << intentToMerge[ process_ ];
       }
 
       mergeBufferSystem.sendAll();
diff --git a/src/blockforest/Initialization.cpp b/src/blockforest/Initialization.cpp
index 436d906c7e2abeef4ef698b225c1b3ac269c59cc..4a91cfa5afbcc059dc642efb28539a5b8297a136 100644
--- a/src/blockforest/Initialization.cpp
+++ b/src/blockforest/Initialization.cpp
@@ -63,7 +63,7 @@ shared_ptr< StructuredBlockForest > createUniformBlockGridFromConfig( const shar
       }
    }
    WALBERLA_ABORT_NO_DEBUG_INFO( "No Configuration specified" );
-   return shared_ptr<StructuredBlockForest>();
+   return {};
 }
 
 
@@ -346,7 +346,7 @@ shared_ptr<BlockForest> createBlockForest(const math::AABB& simulationDomain,
          WALBERLA_LOG_INFO_ON_ROOT( "SetupBlockForest successfully saved to file!" );
       }
 
-      return shared_ptr<BlockForest>();
+      return {};
    }
 
    WALBERLA_MPI_SECTION()
diff --git a/src/blockforest/PhantomBlockForest.h b/src/blockforest/PhantomBlockForest.h
index 92211a7fc7d70c6075e951f83405b0496a8a349b..e1ab5bab05bc91942baf11dff35bd0671f8012ba 100644
--- a/src/blockforest/PhantomBlockForest.h
+++ b/src/blockforest/PhantomBlockForest.h
@@ -114,7 +114,7 @@ inline shared_ptr< PhantomBlock > PhantomBlockForest::getBlock( const BlockID &
    auto it = blocks_.find( id );
    if( it != blocks_.end() )
       return it->second;
-   return shared_ptr< PhantomBlock >();
+   return {};
 }
 
 
diff --git a/src/blockforest/SetupBlockForest.cpp b/src/blockforest/SetupBlockForest.cpp
index 88da3eab0ed4dba6fabeb0a1e3ad460ba93ec3a9..f91b61e7f67164db6a18416ca0bde2e9e57ed9c4 100644
--- a/src/blockforest/SetupBlockForest.cpp
+++ b/src/blockforest/SetupBlockForest.cpp
@@ -699,7 +699,7 @@ void SetupBlockForest::init( const AABB& domain, const uint_t xSize, const uint_
 
    if( !forest_.empty() ) {
       for(auto & coarseBlock : forest_) {
-         if(coarseBlock != nullptr ) delete coarseBlock;
+         delete coarseBlock;
       }
       forest_.clear();
    }
diff --git a/src/blockforest/SetupBlockForest.h b/src/blockforest/SetupBlockForest.h
index 8ffa3508d1f77ff67b55fc5d378aa15ef833f56b..185e1406a198e1a83fc183bbab0a63121d025e9a 100644
--- a/src/blockforest/SetupBlockForest.h
+++ b/src/blockforest/SetupBlockForest.h
@@ -422,7 +422,7 @@ inline SetupBlockForest::~SetupBlockForest() {
 
    for(auto & coarseBlock : forest_)
    {
-      if(coarseBlock != nullptr ) delete coarseBlock;
+      delete coarseBlock;
    }
 }
 
diff --git a/src/blockforest/loadbalancing/DynamicCurve.h b/src/blockforest/loadbalancing/DynamicCurve.h
index 3fa4f37bb093d858eb33db4e62f6f092227d4ab4..3ce5475d87221313762293e748c7e630ccc20079 100644
--- a/src/blockforest/loadbalancing/DynamicCurve.h
+++ b/src/blockforest/loadbalancing/DynamicCurve.h
@@ -177,7 +177,7 @@ private:
 
    bool weightedBlocks() const
    {
-      return ! std::is_same< PhantomData_T, NoPhantomData >::value;
+      return ! std::is_same_v< PhantomData_T, NoPhantomData >;
    }
    
    template< typename T >
diff --git a/src/blockforest/loadbalancing/DynamicDiffusive.h b/src/blockforest/loadbalancing/DynamicDiffusive.h
index 1d844ed5d8c6739f728347a51b0542fdd8502dc7..0cfef6cd2cc4db167af4062bcb342519d056c497 100644
--- a/src/blockforest/loadbalancing/DynamicDiffusive.h
+++ b/src/blockforest/loadbalancing/DynamicDiffusive.h
@@ -116,7 +116,7 @@ private:
 
    double weight( const PhantomBlock * block ) const
    {
-      return std::is_same< PhantomData_T, NoPhantomData >::value ? 1.0 :
+      return std::is_same_v< PhantomData_T, NoPhantomData > ? 1.0 :
                numeric_cast< double >( block->template getData< PhantomData_T >().weight() );
    }