]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
In MT mode, we were getting a compiler error when compiling with
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 13 Dec 2002 17:38:17 +0000 (17:38 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 13 Dec 2002 17:38:17 +0000 (17:38 +0000)
optimization:
=====base=============optimized==MT== parameter_handler.cc
/tmp/ccIx2gJ6.s: Assembler messages:
/tmp/ccIx2gJ6.s:3727: Error: symbol `.LEHB6345' is already defined
/tmp/ccIx2gJ6.s:3738: Error: symbol `.LEHE6345' is already defined
/tmp/ccIx2gJ6.s:3739: Error: symbol `.LEHB6357' is already defined
/tmp/ccIx2gJ6.s:3751: Error: symbol `.LEHE6357' is already defined

This is of course due to some compiler bug, but be that as it is, we
need to work around it. Do that by simply replacing std::list by
std::vector.

git-svn-id: https://svn.dealii.org/trunk@6814 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/parameter_handler.cc

index 6bc062282c9056815c08450dd4a42857c835e289..d1213aed5210ca2c1b7d97e6e3dba50aed92ae63 100644 (file)
@@ -315,7 +315,8 @@ namespace Patterns
   bool List::match (const std::string &test_string_list) const
   {
     std::string tmp = test_string_list;
-    std::list<std::string> split_list;
+    std::vector<std::string> split_list;
+    split_list.reserve (std::count (tmp.begin(), tmp.end(), ',')+1);
 
                                     // first split the input list
     while (tmp.length() != 0)
@@ -345,7 +346,8 @@ namespace Patterns
       return false;
 
                                     // check the different possibilities
-    for (std::list<std::string>::const_iterator test_string = split_list.begin();
+    for (std::vector<std::string>::const_iterator
+           test_string = split_list.begin();
         test_string != split_list.end(); ++test_string) 
       if (pattern->match (*test_string) == false)
         return false;

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.