From 0157181d05a6819c237fb32ac689cb4e05417900 Mon Sep 17 00:00:00 2001 From: Mike Dev Date: Mon, 5 Nov 2018 13:04:27 +0100 Subject: [PATCH] [FS] Use typdef for ifstream type instead of separate #ifdef --- src/boostdep.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/boostdep.cpp b/src/boostdep.cpp index 27488c0..3b10d12 100644 --- a/src/boostdep.cpp +++ b/src/boostdep.cpp @@ -24,10 +24,12 @@ #ifdef BOOSTDEP_USE_STD_FS #include namespace fs = std::filesystem; + typedef std::ifstream ifstream_t; #else #include #include namespace fs = boost::filesystem; + typedef fs::ifstream ifstream_t; #endif @@ -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 ); }