]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Match explicitly defined copy constructors with copy assignment operators
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 9 May 2019 12:49:31 +0000 (08:49 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 9 May 2019 16:14:51 +0000 (12:14 -0400)
include/deal.II/base/thread_management.h
include/deal.II/lac/sparse_matrix.h
include/deal.II/particles/particle_iterator.h
source/particles/particle_iterator.cc

index 931e7f30d70501812d7e299d394fd67336830de0..f06cd09b5c7ec79d20bc7e28490fab1b147ead28 100644 (file)
@@ -1532,6 +1532,18 @@ namespace Threads
      */
     Task() = default;
 
+
+    /**
+     * Copy assignment operator.
+     */
+    const Task &
+    operator=(const Task<RT> &t)
+    {
+      task_descriptor = t.task_descriptor;
+      return *this;
+    }
+
+
     /**
      * Join the task represented by this object, i.e. wait for it to finish.
      *
index ec2731eee38457a89e342ed5702182e808b86d54..853700501b63f3ce3477fe679e7354c6cf76136a 100644 (file)
@@ -378,6 +378,12 @@ namespace SparseMatrixIterators
      */
     Iterator(const SparseMatrixIterators::Iterator<number, false> &i);
 
+    /**
+     * Copy assignment operator.
+     */
+    const Iterator<number, Constness> &
+    operator=(const SparseMatrixIterators::Iterator<number, false> &i);
+
     /**
      * Prefix increment.
      */
@@ -2262,6 +2268,17 @@ namespace SparseMatrixIterators
 
 
 
+  template <typename number, bool Constness>
+  inline const Iterator<number, Constness> &
+  Iterator<number, Constness>::
+  operator=(const SparseMatrixIterators::Iterator<number, false> &i)
+  {
+    accessor = *i;
+    return *this;
+  }
+
+
+
   template <typename number, bool Constness>
   inline Iterator<number, Constness> &
   Iterator<number, Constness>::operator++()
index 5e687fb7a90bd5e42275bc69d3fc4c006eee67f2..b2b340acc5b7229f47f9787a6bee8fdec04ff180 100644 (file)
@@ -66,7 +66,7 @@ namespace Particles
      * Assignment operator.
      */
     ParticleIterator &
-    operator=(const ParticleIterator &);
+    operator=(const ParticleIterator &) = default;
 
     /**
      * Dereferencing operator, returns a pointer of the particle pointed to.
index 9b5345ee6d219333a42c4df59df2ee0d3df951f4..2a9956817d4386d4785da2bdf6c09d588e6832c0 100644 (file)
@@ -62,15 +62,6 @@ namespace Particles
   }
 
 
-  template <int dim, int spacedim>
-  ParticleIterator<dim, spacedim> &
-  ParticleIterator<dim, spacedim>::operator=(const ParticleIterator &other)
-  {
-    accessor = other.accessor;
-    return *this;
-  }
-
-
 
   template <int dim, int spacedim>
   bool

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.