1
0
Fork 0

Removed Boost foreach

This commit is contained in:
Scott Giese 2018-07-16 12:26:40 -05:00
parent 76de889c47
commit e9dc4b9d8c
5 changed files with 5 additions and 12 deletions

View file

@ -24,8 +24,6 @@
# include <config.h> # include <config.h>
#endif #endif
#include <boost/foreach.hpp>
#include <simgear/misc/sg_dir.hxx> #include <simgear/misc/sg_dir.hxx>
#include <simgear/debug/logstream.hxx> #include <simgear/debug/logstream.hxx>
@ -61,7 +59,7 @@ int TGConstruct::LoadLandclassPolys( void ) {
simgear::PathList files = d.children(simgear::Dir::TYPE_FILE); simgear::PathList files = d.children(simgear::Dir::TYPE_FILE);
SG_LOG( SG_CLIPPER, SG_DEBUG, files.size() << " Polys in " << d.path() ); SG_LOG( SG_CLIPPER, SG_DEBUG, files.size() << " Polys in " << d.path() );
BOOST_FOREACH(const SGPath& p, files) { for (const SGPath& p : files) {
if (p.file_base() != tile_str) { if (p.file_base() != tile_str) {
continue; continue;
} }

View file

@ -41,8 +41,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <boost/foreach.hpp>
#include <simgear/bucket/newbucket.hxx> #include <simgear/bucket/newbucket.hxx>
#include <simgear/misc/sg_path.hxx> #include <simgear/misc/sg_path.hxx>
#include <simgear/misc/sg_dir.hxx> #include <simgear/misc/sg_dir.hxx>
@ -222,7 +220,7 @@ static bool must_generate( const SGBucket& b ) {
continue; continue;
} }
BOOST_FOREACH(const SGPath& c, loadDir.children(simgear::Dir::TYPE_FILE)) { for (const SGPath& c : loadDir.children(simgear::Dir::TYPE_FILE)) {
if (!simgear::strutils::starts_with(c.file(), prefix)) { if (!simgear::strutils::starts_with(c.file(), prefix)) {
continue; continue;
} }

View file

@ -42,7 +42,6 @@
#include <simgear/misc/sg_path.hxx> #include <simgear/misc/sg_path.hxx>
#include <simgear/misc/sg_dir.hxx> #include <simgear/misc/sg_dir.hxx>
#include <boost/foreach.hpp>
#include <tiffio.h> #include <tiffio.h>
#include <zlib.h> #include <zlib.h>
#include <Lib/HGT/srtmbase.hxx> #include <Lib/HGT/srtmbase.hxx>
@ -150,7 +149,7 @@ bool TGSrtmTiff::open( const SGPath &f ) {
string command = "unzip -d \"" + tmp_dir.path().str() + "\" " + file_name.base(); string command = "unzip -d \"" + tmp_dir.path().str() + "\" " + file_name.base();
if ( system( command.c_str() ) != -1 ) { if ( system( command.c_str() ) != -1 ) {
simgear::PathList files = tmp_dir.children(simgear::Dir::TYPE_FILE | simgear::Dir::NO_DOT_OR_DOTDOT); simgear::PathList files = tmp_dir.children(simgear::Dir::TYPE_FILE | simgear::Dir::NO_DOT_OR_DOTDOT);
BOOST_FOREACH(const SGPath& file, files) { for (const SGPath& file : files) {
string ext = file.lower_extension(); string ext = file.lower_extension();
if ( (ext == "tif") || (ext == "tiff") ) { if ( (ext == "tif") || (ext == "tiff") ) {
file_name = file; file_name = file;

View file

@ -43,7 +43,6 @@
#endif #endif
#include <zlib.h> #include <zlib.h>
#include <boost/foreach.hpp>
#include <simgear/debug/logstream.hxx> #include <simgear/debug/logstream.hxx>
#include <simgear/bucket/newbucket.hxx> #include <simgear/bucket/newbucket.hxx>
@ -245,7 +244,7 @@ void walk_path(const SGPath& path) {
} else if (path.isDir()) { } else if (path.isDir()) {
Dir d(path); Dir d(path);
int flags = Dir::TYPE_DIR | Dir::TYPE_FILE | Dir::NO_DOT_OR_DOTDOT; int flags = Dir::TYPE_DIR | Dir::TYPE_FILE | Dir::NO_DOT_OR_DOTDOT;
BOOST_FOREACH(const SGPath& p, d.children(flags)) { for (const SGPath& p : d.children(flags)) {
walk_path(p); walk_path(p);
} }
} }

View file

@ -35,7 +35,6 @@
# include <unistd.h> # include <unistd.h>
#endif #endif
#include <boost/foreach.hpp>
#include <ogrsf_frmts.h> #include <ogrsf_frmts.h>
#include <simgear/debug/logstream.hxx> #include <simgear/debug/logstream.hxx>
@ -415,7 +414,7 @@ void process_file(const SGPath& path)
simgear::Dir d(path); simgear::Dir d(path);
int flags = simgear::Dir::TYPE_FILE | simgear::Dir::TYPE_DIR | int flags = simgear::Dir::TYPE_FILE | simgear::Dir::TYPE_DIR |
simgear::Dir::NO_DOT_OR_DOTDOT; simgear::Dir::NO_DOT_OR_DOTDOT;
BOOST_FOREACH(const SGPath& c, d.children(flags)) { for (const SGPath& c : d.children(flags)) {
process_file(c); process_file(c);
} }