From 616c53a2adfd88ce2ae8da9d2dd1f24f6a2e2fae Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <dmitri.naumov@ufz.de>
Date: Tue, 28 Apr 2015 15:56:39 +0200
Subject: [PATCH] [PL] Const-correctness. Change ptr to reference.

---
 ProcessLib/NeumannBc.h       | 6 +++---
 ProcessLib/ProcessVariable.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ProcessLib/NeumannBc.h b/ProcessLib/NeumannBc.h
index b46d3f6d070..995ee16ab2e 100644
--- a/ProcessLib/NeumannBc.h
+++ b/ProcessLib/NeumannBc.h
@@ -50,17 +50,17 @@ public:
     /// DOF-table, and a mesh subset.
     /// A local DOF-table, a subset of the given one, is constructed.
     NeumannBc(
-        NeumannBcConfig* bc,
+        NeumannBcConfig const& bc,
         unsigned const integration_order,
         AssemblerLib::LocalToGlobalIndexMap const& local_to_global_index_map,
         MeshLib::MeshSubset const& mesh_subset_all_nodes
         )
         :
-          _function(*bc->getFunction()),
+          _function(*bc.getFunction()),
           _integration_order(integration_order)
     {
         // deep copy because the neumann bc config destroys the elements.
-        std::transform(bc->elementsBegin(), bc->elementsEnd(),
+        std::transform(bc.elementsBegin(), bc.elementsEnd(),
                 std::back_inserter(_elements),
                 std::mem_fn(&MeshLib::Element::clone));
 
diff --git a/ProcessLib/ProcessVariable.h b/ProcessLib/ProcessVariable.h
index e34220e5fbf..e17a572dba3 100644
--- a/ProcessLib/ProcessVariable.h
+++ b/ProcessLib/ProcessVariable.h
@@ -58,7 +58,7 @@ public:
         for (NeumannBcConfig* config : _neumann_bc_configs)
         {
             config->initialize(searcher);
-            bcs = new NeumannBc<GlobalSetup>(config, std::forward<Args>(args)...);
+            bcs = new NeumannBc<GlobalSetup>(*config, std::forward<Args>(args)...);
         }
     }
 
-- 
GitLab