]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix move construction/assignment for Subscriptor
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 5 Jun 2020 16:20:01 +0000 (12:20 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 5 Jun 2020 18:35:32 +0000 (14:35 -0400)
source/base/subscriptor.cc

index fc9334d562ebf93b852bff15b28929ed0179d8ca..e6e7a8365afb81645b44c67177cb1e116fcd10b1 100644 (file)
@@ -36,6 +36,7 @@ Subscriptor::Subscriptor(Subscriptor &&subscriptor) noexcept
 {
   for (const auto validity_ptr : subscriptor.validity_pointers)
     *validity_ptr = false;
+  subscriptor.validity_pointers.clear();
 }
 
 
@@ -124,6 +125,7 @@ Subscriptor::operator=(Subscriptor &&s) noexcept
 {
   for (const auto validity_ptr : s.validity_pointers)
     *validity_ptr = false;
+  s.validity_pointers.clear();
   object_info = s.object_info;
   return *this;
 }

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.