From ec532ebe3351ce19b83222f96bd7c3e176b43518 Mon Sep 17 00:00:00 2001 From: David Wells Date: Tue, 3 Jan 2017 12:04:31 -0500 Subject: [PATCH] Move some variables into the initialization list. This was caught by cppcheck. --- source/base/parameter_handler.cc | 3 +-- source/lac/trilinos_vector_base.cc | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/source/base/parameter_handler.cc b/source/base/parameter_handler.cc index 509c15b4d1..b7bc4f21da 100644 --- a/source/base/parameter_handler.cc +++ b/source/base/parameter_handler.cc @@ -454,9 +454,8 @@ namespace Patterns Selection::Selection (const std::string &seq) + : sequence(seq) { - sequence = seq; - while (sequence.find(" |") != std::string::npos) sequence.replace (sequence.find(" |"), 2, "|"); while (sequence.find("| ") != std::string::npos) diff --git a/source/lac/trilinos_vector_base.cc b/source/lac/trilinos_vector_base.cc index 1f5d8d50f0..918d60d93c 100644 --- a/source/lac/trilinos_vector_base.cc +++ b/source/lac/trilinos_vector_base.cc @@ -100,10 +100,9 @@ namespace TrilinosWrappers last_action (Zero), compressed (true), has_ghosts (v.has_ghosts), - vector(new Epetra_FEVector(*v.vector)) - { - owned_elements = complete_index_set(v.size()); - } + vector(new Epetra_FEVector(*v.vector)), + owned_elements(complete_index_set(v.size())) + {} -- 2.39.5