From 6922276add2ff1bb2aef29796e29ce5c0fecd7c9 Mon Sep 17 00:00:00 2001 From: David Wells Date: Thu, 22 Sep 2016 18:59:13 -0400 Subject: [PATCH] Prefer std::vector to std::list. When the only method we use is push_back there is no reason to use a list instead of a vector. --- source/base/parameter_handler.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/source/base/parameter_handler.cc b/source/base/parameter_handler.cc index 7d92047a2a..75ced58783 100644 --- a/source/base/parameter_handler.cc +++ b/source/base/parameter_handler.cc @@ -31,7 +31,6 @@ DEAL_II_ENABLE_EXTRA_DIAGNOSTICS #include #include #include -#include #include #include #include @@ -971,7 +970,7 @@ namespace Patterns bool MultipleSelection::match (const std::string &test_string_list) const { std::string tmp = test_string_list; - std::list split_list; + std::vector split_names; // first split the input list while (tmp.length() != 0) @@ -993,13 +992,13 @@ namespace Patterns while (std::isspace (name[name.length()-1])) name.erase (name.length()-1, 1); - split_list.push_back (name); + split_names.push_back (name); }; // check the different possibilities - for (std::list::const_iterator test_string = split_list.begin(); - test_string != split_list.end(); ++test_string) + for (std::vector::const_iterator test_string = split_names.begin(); + test_string != split_names.end(); ++test_string) { bool string_found = false; -- 2.39.5