]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move some variables into the initialization list.
authorDavid Wells <wellsd2@rpi.edu>
Tue, 3 Jan 2017 17:04:31 +0000 (12:04 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Wed, 4 Jan 2017 00:54:48 +0000 (19:54 -0500)
This was caught by cppcheck.

source/base/parameter_handler.cc
source/lac/trilinos_vector_base.cc

index 509c15b4d15f00c01c748e4d7d184dd47ef1c29f..b7bc4f21da8a99fba2a6971c222012ef42fe0b4f 100644 (file)
@@ -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)
index 1f5d8d50f0233428a77a6635b25282aecba99e9d..918d60d93c15705d782ba9869e78665c9864a194 100644 (file)
@@ -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()))
+  {}
 
 
 

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.