From 952a62f5071ea9640c80837bfeb2df446855cae5 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Tue, 23 Jun 2020 18:43:54 +0200
Subject: [PATCH] [bugfix][pointsource] Do not move a variable that is still
 used afterwards

---
 dumux/common/pointsource.hh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/dumux/common/pointsource.hh b/dumux/common/pointsource.hh
index 9633fa6af7..b7a7bf61d3 100644
--- a/dumux/common/pointsource.hh
+++ b/dumux/common/pointsource.hh
@@ -317,9 +317,9 @@ public:
                     {
                         const auto key = std::make_pair(eIdx, scvIdx);
                         if (pointSourceMap.count(key))
-                            pointSourceMap.at(key).emplace_back(std::move(source));
+                            pointSourceMap.at(key).push_back(source);
                         else
-                            pointSourceMap.insert({key, {std::move(source)}});
+                            pointSourceMap.insert({key, {source}});
                         // split equally on the number of matched scvs
                         auto& s = pointSourceMap.at(key).back();
                         s.setEmbeddings(scvIndices.size()*s.embeddings());
@@ -330,9 +330,9 @@ public:
                     // add the pointsource to the DOF map
                     const auto key = std::make_pair(eIdx, /*scvIdx=*/ 0);
                     if (pointSourceMap.count(key))
-                        pointSourceMap.at(key).emplace_back(std::move(source));
+                        pointSourceMap.at(key).push_back(source);
                     else
-                        pointSourceMap.insert({key, {std::move(source)}});
+                        pointSourceMap.insert({key, {source}});
                 }
             }
         }
-- 
GitLab