]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make an argument 'const'.
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 14 Sep 2017 19:33:32 +0000 (13:33 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sun, 17 Sep 2017 23:56:42 +0000 (17:56 -0600)
include/deal.II/fe/fe.h
source/fe/fe.cc

index fc3165d1c67de13b2775fabb94fa6ed691188aff..978556c8456acaaea026d911239a1d3b6bda3aed 100644 (file)
@@ -779,7 +779,7 @@ public:
    * current object.
    */
   std::pair<std::unique_ptr<FiniteElement<dim, spacedim> >, unsigned int>
-  operator^ (unsigned int multiplicity) const;
+  operator^ (const unsigned int multiplicity) const;
 
   /**
    * A sort of virtual copy constructor, this function returns a copy of
index 5b09abb34e59ab4e0cbe8ef9598b1848fb449222..9e9683827df9799bef8e21d77f60182a4befd31b 100644 (file)
@@ -153,10 +153,9 @@ FiniteElement (const FiniteElementData<dim> &fe_data,
 
 template <int dim, int spacedim>
 std::pair<std::unique_ptr<FiniteElement<dim, spacedim> >, unsigned int>
-FiniteElement<dim, spacedim>::operator^ (unsigned int multiplicity) const
+FiniteElement<dim, spacedim>::operator^ (const unsigned int multiplicity) const
 {
-  return std::make_pair<std::unique_ptr<FiniteElement<dim, spacedim>>,
-         unsigned int> (std::move(this->clone()), std::move(multiplicity));
+  return {this->clone(), multiplicity};
 }
 
 

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.