From: deal Date: Wed, 20 Aug 2003 16:16:50 +0000 (+0000) Subject: Work around a problem with cxx which would generate an executable that segfaults... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=796983eebf7132f49082838b156e5fa970986b93;p=dealii-svn.git Work around a problem with cxx which would generate an executable that segfaults with the old code. git-svn-id: https://svn.dealii.org/trunk@7951 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/common/scripts/make_dependencies.cc b/deal.II/common/scripts/make_dependencies.cc index f295cd59e4..3a00e2de18 100644 --- a/deal.II/common/scripts/make_dependencies.cc +++ b/deal.II/common/scripts/make_dependencies.cc @@ -71,12 +71,11 @@ void determine_direct_includes (const std::string &file) // will have to have the path to // the present file later, so get // it already here - const std::string present_path (file.find ('/') != std::string::npos - ? - std::string (file.begin(), - file.begin()+file.rfind ('/')+1) - : - ""); + std::string present_path; + if (file.find ('/') != std::string::npos) + present_path = std::string (file.begin(), + file.begin()+file.rfind ('/')+1); + std::ifstream in(file.c_str()); assert ((bool)in);