From 9d1521601c316b9641a9ac1d4bae8ee7c15df98a Mon Sep 17 00:00:00 2001 From: Christian Godenschwager <christian.godenschwager@fau.de> Date: Fri, 1 Jun 2018 12:17:38 +0200 Subject: [PATCH] Remove BOOST_FOREACH macro and replace range-based for --- src/core/Environment.cpp | 1 - src/core/cell/CellInterval.cpp | 4 +--- src/core/config/ConfigToBoostPropertyTree.cpp | 3 +-- tests/geometry/VoxelFileTest.cpp | 2 +- 4 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/core/Environment.cpp b/src/core/Environment.cpp index 17f2e990b..b39a0b304 100644 --- a/src/core/Environment.cpp +++ b/src/core/Environment.cpp @@ -31,7 +31,6 @@ #include "core/uid/SUID.h" #include <boost/algorithm/string.hpp> -#include <boost/foreach.hpp> #include <algorithm> #include <functional> diff --git a/src/core/cell/CellInterval.cpp b/src/core/cell/CellInterval.cpp index 78f4501f0..83ab0e33d 100644 --- a/src/core/cell/CellInterval.cpp +++ b/src/core/cell/CellInterval.cpp @@ -23,8 +23,6 @@ #include "CellSet.h" #include "CellVector.h" -#include <boost/foreach.hpp> - namespace walberla { namespace cell { @@ -51,7 +49,7 @@ bool CellInterval::overlaps( const CellVector& cellVector ) const if( empty() ) return false; - BOOST_FOREACH( const Cell & cell, cellVector ) + for( const Cell & cell : cellVector ) { if( this->contains( cell ) ) return true; diff --git a/src/core/config/ConfigToBoostPropertyTree.cpp b/src/core/config/ConfigToBoostPropertyTree.cpp index 7fcc13247..e3b5e6b40 100644 --- a/src/core/config/ConfigToBoostPropertyTree.cpp +++ b/src/core/config/ConfigToBoostPropertyTree.cpp @@ -21,7 +21,6 @@ #include "ConfigToBoostPropertyTree.h" -#include <boost/foreach.hpp> #include <boost/property_tree/ptree.hpp> @@ -39,7 +38,7 @@ boost::property_tree::iptree configBlockHandleToBoostPropertyTree( const Config: Config::Blocks blocks; blockHandle.getBlocks(blocks); - BOOST_FOREACH( const Config::BlockHandle & handle, blocks ) + for( const Config::BlockHandle & handle : blocks ) propTree.add_child( handle.getKey(), configBlockHandleToBoostPropertyTree( handle ) ); return propTree; diff --git a/tests/geometry/VoxelFileTest.cpp b/tests/geometry/VoxelFileTest.cpp index 3d6d18fa1..e93b1cfa1 100644 --- a/tests/geometry/VoxelFileTest.cpp +++ b/tests/geometry/VoxelFileTest.cpp @@ -53,7 +53,7 @@ #include "core/mpi/MPIManager.h" #include "core/Filesystem.h" -#include <boost/foreach.hpp> + #include <random> #ifdef _MSC_VER -- GitLab