]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Remove an unnecessary copy constructor.
authorDavid Wells <wellsd2@rpi.edu>
Sat, 12 Nov 2016 03:08:32 +0000 (22:08 -0500)
committerDavid Wells <wellsd2@rpi.edu>
Sat, 12 Nov 2016 03:08:32 +0000 (22:08 -0500)
PVS studio rightfully complains that we should define operator= whenever
we explicitly define a copy constructor. However, since our copy
constructor does nothing special it is in fact equivalent to the default
copy constructor, so we can just get get rid of it and let the compiler
generate the correct copying code.

include/deal.II/lac/petsc_matrix_base.h

index 4d8ca762197e2016fe5980182b894895dc4e4109..0dd365bfff22683643c6f36ec39897a7e26ed3fc 100644 (file)
@@ -82,11 +82,6 @@ namespace PETScWrappers
                   const size_type   row,
                   const size_type   index);
 
-        /**
-         * Copy constructor.
-         */
-        Accessor (const Accessor &a);
-
         /**
          * Row number of the element represented by this object.
          */
@@ -1000,17 +995,6 @@ namespace PETScWrappers
     }
 
 
-    inline
-    const_iterator::Accessor::
-    Accessor (const Accessor &a)
-      :
-      matrix(a.matrix),
-      a_row(a.a_row),
-      a_index(a.a_index),
-      colnum_cache (a.colnum_cache),
-      value_cache (a.value_cache)
-    {}
-
 
     inline
     const_iterator::Accessor::size_type

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.