]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Replace std::memmove by std::move for std::pair 6469/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 4 May 2018 22:49:12 +0000 (00:49 +0200)
committerMatthias Maier <tamiko@43-1.org>
Sat, 5 May 2018 02:24:39 +0000 (21:24 -0500)
include/deal.II/lac/constraint_matrix.templates.h

index 781173d7492d15385a425a12d667d3bd3911b249..80bf4528d767bd80527aeae1063852fbe2c0b823 100644 (file)
@@ -1062,9 +1062,9 @@ namespace internals
           // at least one element when we get here, subtracting 1 works fine.
           data.resize(2*data.size());
           for (size_type i=individual_size.size()-1; i>0; --i)
-            std::memmove(&data[i*row_length*2], &data[i*row_length],
-                         individual_size[i]*
-                         sizeof(std::pair<size_type,double>));
+            std::move(data.data()+(i*row_length*2),
+                      data.data()+(i*row_length+2+individual_size[i]),
+                      data.data()+(i*row_length));
           row_length *= 2;
         }
       data[index*row_length+my_length] = pair;

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.