From 7c597b1b89851f9c8d27f0fb5a9dae8e186220ba Mon Sep 17 00:00:00 2001 From: deal Date: Wed, 20 Aug 2003 16:16:50 +0000 Subject: [PATCH] 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 --- deal.II/common/scripts/make_dependencies.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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); -- 2.39.5