Skip to content
Snippets Groups Projects
Commit fa81e2b5 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

Merge branch 'bugfix/pointsource-do-not-move-variable-still-in-use' into 'master'

[bugfix][pointsource] Do not move a variable that is still used afterwards

Closes #899

See merge request !2193
parents e4cd5be3 952a62f5
No related branches found
No related tags found
1 merge request!2193[bugfix][pointsource] Do not move a variable that is still used afterwards
...@@ -317,9 +317,9 @@ public: ...@@ -317,9 +317,9 @@ public:
{ {
const auto key = std::make_pair(eIdx, scvIdx); const auto key = std::make_pair(eIdx, scvIdx);
if (pointSourceMap.count(key)) if (pointSourceMap.count(key))
pointSourceMap.at(key).emplace_back(std::move(source)); pointSourceMap.at(key).push_back(source);
else else
pointSourceMap.insert({key, {std::move(source)}}); pointSourceMap.insert({key, {source}});
// split equally on the number of matched scvs // split equally on the number of matched scvs
auto& s = pointSourceMap.at(key).back(); auto& s = pointSourceMap.at(key).back();
s.setEmbeddings(scvIndices.size()*s.embeddings()); s.setEmbeddings(scvIndices.size()*s.embeddings());
...@@ -330,9 +330,9 @@ public: ...@@ -330,9 +330,9 @@ public:
// add the pointsource to the DOF map // add the pointsource to the DOF map
const auto key = std::make_pair(eIdx, /*scvIdx=*/ 0); const auto key = std::make_pair(eIdx, /*scvIdx=*/ 0);
if (pointSourceMap.count(key)) if (pointSourceMap.count(key))
pointSourceMap.at(key).emplace_back(std::move(source)); pointSourceMap.at(key).push_back(source);
else else
pointSourceMap.insert({key, {std::move(source)}}); pointSourceMap.insert({key, {source}});
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment