Skip to content

Commit bbd2879

Browse files
committed
[FS] Use typdef for ifstream type instead of separate #ifdef
1 parent ed35ff1 commit bbd2879

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: src/boostdep.cpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,12 @@
2424
#ifdef BOOSTDEP_USE_STD_FS
2525
#include <filesystem>
2626
namespace fs = std::filesystem;
27+
typedef std::ifstream ifstream_t;
2728
#else
2829
#include <boost/filesystem.hpp>
2930
#include <boost/filesystem/fstream.hpp>
3031
namespace fs = boost::filesystem;
32+
typedef boost::ifstream ifstream_t;
3133
#endif
3234

3335

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

233-
#ifdef BOOSTDEP_USE_STD_FS
234-
std::ifstream is( it->path() );
235-
#else
236-
fs::ifstream is( it->path() );
237-
#endif
235+
ifstream_t is( it->path() );
238236

239237
scan_header_dependencies( header, is, deps, from );
240238
}

0 commit comments

Comments
 (0)