From 23bbbc4b30a9dd8f099a2c331a9b8ed8b0e79f24 Mon Sep 17 00:00:00 2001 From: wolf Date: Fri, 13 Dec 2002 17:38:17 +0000 Subject: [PATCH] In MT mode, we were getting a compiler error when compiling with 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deal.II/base/source/parameter_handler.cc b/deal.II/base/source/parameter_handler.cc index 6bc062282c..d1213aed52 100644 --- a/deal.II/base/source/parameter_handler.cc +++ b/deal.II/base/source/parameter_handler.cc @@ -315,7 +315,8 @@ namespace Patterns bool List::match (const std::string &test_string_list) const { std::string tmp = test_string_list; - std::list split_list; + std::vector 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::const_iterator test_string = split_list.begin(); + for (std::vector::const_iterator + test_string = split_list.begin(); test_string != split_list.end(); ++test_string) if (pattern->match (*test_string) == false) return false; -- 2.39.5