Skip to content

Commit

Permalink
[FS] Use typdef for ifstream type instead of separate #ifdef
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Devel committed Nov 5, 2018
1 parent ed35ff1 commit 0157181
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/boostdep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@
#ifdef BOOSTDEP_USE_STD_FS
#include <filesystem>
namespace fs = std::filesystem;
typedef std::ifstream ifstream_t;
#else
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
namespace fs = boost::filesystem;
typedef fs::ifstream ifstream_t;
#endif


Expand Down Expand Up @@ -230,11 +232,7 @@ static void scan_module_path( fs::path const & dir, bool remove_prefix, std::map
header = header.substr( n+1 );
}

#ifdef BOOSTDEP_USE_STD_FS
std::ifstream is( it->path() );
#else
fs::ifstream is( it->path() );
#endif
ifstream_t is( it->path() );

scan_header_dependencies( header, is, deps, from );
}
Expand Down

0 comments on commit 0157181

Please sign in to comment.