]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a problem with cxx which would generate an executable that segfaults...
authordeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Aug 2003 16:16:50 +0000 (16:16 +0000)
committerdeal <deal@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 20 Aug 2003 16:16:50 +0000 (16:16 +0000)
git-svn-id: https://svn.dealii.org/trunk@7951 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/common/scripts/make_dependencies.cc

index f295cd59e4b5976e212b406e840bc886026a9cfb..3a00e2de189639903f3db471cb3ddbd3fed40471 100644 (file)
@@ -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);
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.