From: Daniel Arndt Date: Sat, 10 Mar 2018 05:44:28 +0000 (+0100) Subject: Fix llvm-6 clang-tidy performance findings X-Git-Tag: v9.0.0-rc1~339^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=981edcf5170a21f7b59bf10085175df700501b63;p=dealii.git Fix llvm-6 clang-tidy performance findings --- diff --git a/include/deal.II/base/aligned_vector.h b/include/deal.II/base/aligned_vector.h index 14688377bd..eb9c00955a 100644 --- a/include/deal.II/base/aligned_vector.h +++ b/include/deal.II/base/aligned_vector.h @@ -103,7 +103,7 @@ public: * Move constructor. Create a new aligned vector by stealing the contents of * @p vec. */ - AlignedVector (AlignedVector &&vec); + AlignedVector (AlignedVector &&vec) noexcept; /** * Assignment to the input vector @p vec. @@ -117,7 +117,7 @@ public: * Move assignment operator. */ AlignedVector & - operator = (AlignedVector &&vec); + operator = (AlignedVector &&vec) noexcept; /** * Change the size of the vector. It keeps old elements previously available @@ -694,11 +694,11 @@ AlignedVector::AlignedVector (const AlignedVector &vec) template < class T > inline -AlignedVector::AlignedVector (AlignedVector &&vec) - : - _data (vec._data), - _end_data (vec._end_data), - _end_allocated (vec._end_allocated) +AlignedVector::AlignedVector (AlignedVector &&vec) noexcept +: +_data (vec._data), + _end_data (vec._end_data), + _end_allocated (vec._end_allocated) { vec._data = nullptr; vec._end_data = nullptr; @@ -723,7 +723,7 @@ AlignedVector::operator = (const AlignedVector &vec) template < class T > inline AlignedVector & -AlignedVector::operator = (AlignedVector &&vec) +AlignedVector::operator = (AlignedVector &&vec) noexcept { clear(); diff --git a/include/deal.II/base/index_set.h b/include/deal.II/base/index_set.h index 371c3b4c1f..908d3dfbb4 100644 --- a/include/deal.II/base/index_set.h +++ b/include/deal.II/base/index_set.h @@ -122,13 +122,13 @@ public: * Move constructor. Create a new IndexSet by transferring the internal data * of the input set. */ - IndexSet (IndexSet &&is); + IndexSet (IndexSet &&is) noexcept; /** * Move assignment operator. Transfer the internal data of the input set into * the current one. */ - IndexSet &operator= (IndexSet &&is); + IndexSet &operator= (IndexSet &&is) noexcept; #ifdef DEAL_II_WITH_TRILINOS /** @@ -1390,12 +1390,12 @@ IndexSet::IndexSet (const size_type size) inline -IndexSet::IndexSet (IndexSet &&is) - : - ranges (std::move(is.ranges)), - is_compressed (is.is_compressed), - index_space_size (is.index_space_size), - largest_range (is.largest_range) +IndexSet::IndexSet (IndexSet &&is) noexcept +: +ranges (std::move(is.ranges)), + is_compressed (is.is_compressed), + index_space_size (is.index_space_size), + largest_range (is.largest_range) { is.ranges.clear (); is.is_compressed = true; @@ -1408,7 +1408,7 @@ IndexSet::IndexSet (IndexSet &&is) inline -IndexSet &IndexSet::operator= (IndexSet &&is) +IndexSet &IndexSet::operator= (IndexSet &&is) noexcept { ranges = std::move (is.ranges); is_compressed = is.is_compressed; diff --git a/include/deal.II/base/quadrature.h b/include/deal.II/base/quadrature.h index 34ae8ad055..a8f0b125a1 100644 --- a/include/deal.II/base/quadrature.h +++ b/include/deal.II/base/quadrature.h @@ -137,7 +137,7 @@ public: * Move constructor. Construct a new quadrature object by transferring the * internal data of another quadrature object. */ - Quadrature (Quadrature &&) = default; + Quadrature (Quadrature &&) noexcept = default; /** * Construct a quadrature formula from given vectors of quadrature points @@ -177,7 +177,7 @@ public: * Move assignment operator. Moves all data from another quadrature object * to this object. */ - Quadrature &operator = (Quadrature &&) = default; + Quadrature &operator = (Quadrature &&) = default; // NOLINT /** * Test for equality of two quadratures. diff --git a/include/deal.II/base/quadrature_lib.h b/include/deal.II/base/quadrature_lib.h index ea545fa23c..548e9acd7b 100644 --- a/include/deal.II/base/quadrature_lib.h +++ b/include/deal.II/base/quadrature_lib.h @@ -257,7 +257,7 @@ public: * Move constructor. We cannot rely on the move constructor for `Quadrature`, * since it does not know about the additional member `fraction` of this class. */ - QGaussLogR(QGaussLogR &&) = default; + QGaussLogR(QGaussLogR &&) noexcept = default; protected: /** @@ -548,7 +548,7 @@ public: * Move constructor. We cannot rely on the move constructor for `Quadrature`, * since it does not know about the additional member `ep` of this class. */ - QGaussRadauChebyshev(QGaussRadauChebyshev &&) = default; + QGaussRadauChebyshev(QGaussRadauChebyshev &&) noexcept = default; private: const EndPoint ep; diff --git a/include/deal.II/base/subscriptor.h b/include/deal.II/base/subscriptor.h index fcf4d10be5..a4d8746ba2 100644 --- a/include/deal.II/base/subscriptor.h +++ b/include/deal.II/base/subscriptor.h @@ -79,7 +79,7 @@ public: * An object inheriting from Subscriptor can only be moved if no other * objects are subscribing to it. */ - Subscriptor(Subscriptor &&); + Subscriptor(Subscriptor &&) noexcept; /** * Destructor, asserting that the counter is zero. @@ -99,7 +99,7 @@ public: * * Asserts that the counter for the moved object is zero. */ - Subscriptor &operator = (Subscriptor &&); + Subscriptor &operator = (Subscriptor &&) noexcept; /** * Subscribes a user of the object. The subscriber may be identified by text diff --git a/include/deal.II/base/table.h b/include/deal.II/base/table.h index d568d0b9cb..1ae43e7b97 100644 --- a/include/deal.II/base/table.h +++ b/include/deal.II/base/table.h @@ -447,7 +447,7 @@ public: /** * Move constructor. Transfers the contents of another Table. */ - TableBase (TableBase &&src); + TableBase (TableBase &&src) noexcept; /** * Destructor. Free allocated memory. @@ -478,7 +478,7 @@ public: * Move assignment operator. Transfer all elements of src into the * table. */ - TableBase &operator = (TableBase &&src); + TableBase &operator = (TableBase &&src) noexcept; /** * Test for equality of two tables. @@ -1655,11 +1655,11 @@ TableBase::TableBase (const TableBase &src) template -TableBase::TableBase (TableBase &&src) - : - Subscriptor (std::move(src)), - values (std::move(src.values)), - table_size (src.table_size) +TableBase::TableBase (TableBase &&src) noexcept +: +Subscriptor (std::move(src)), + values (std::move(src.values)), + table_size (src.table_size) { src.table_size = TableIndices(); } @@ -1829,7 +1829,7 @@ TableBase::operator = (const TableBase &m) template inline TableBase & -TableBase::operator = (TableBase &&m) +TableBase::operator = (TableBase &&m) noexcept { static_cast(*this) = std::move(m); values = std::move(m.values); diff --git a/include/deal.II/fe/fe.h b/include/deal.II/fe/fe.h index 8af91cda68..0b6203c16a 100644 --- a/include/deal.II/fe/fe.h +++ b/include/deal.II/fe/fe.h @@ -757,7 +757,7 @@ public: /** * Move constructor. */ - FiniteElement (FiniteElement &&) = default; + FiniteElement (FiniteElement &&) = default; // NOLINT /** * Copy constructor. diff --git a/include/deal.II/fe/fe_system.h b/include/deal.II/fe/fe_system.h index 2449def73a..2a17e791af 100644 --- a/include/deal.II/fe/fe_system.h +++ b/include/deal.II/fe/fe_system.h @@ -492,7 +492,7 @@ public: /** * Move constructor. */ - FESystem (FESystem &&) = default; + FESystem (FESystem &&) = default; // NOLINT /** * Destructor. diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index b91b33d336..541d541f32 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -3188,7 +3188,7 @@ namespace GridTools { CellId::binary_type value; ar &value; - cell_ids.emplace_back(std::move(value)); + cell_ids.emplace_back(value); } ar &data; } diff --git a/include/deal.II/grid/tria.h b/include/deal.II/grid/tria.h index f35a5709b6..b493a86dbd 100644 --- a/include/deal.II/grid/tria.h +++ b/include/deal.II/grid/tria.h @@ -1646,12 +1646,12 @@ public: * Create a new triangulation by stealing the internal data of another * triangulation. */ - Triangulation (Triangulation &&tria); + Triangulation (Triangulation &&tria) noexcept; /** * Move assignment operator. */ - Triangulation &operator = (Triangulation &&tria); + Triangulation &operator = (Triangulation &&tria) noexcept; /** * Delete the object and all levels of the hierarchy. diff --git a/include/deal.II/hp/fe_collection.h b/include/deal.II/hp/fe_collection.h index 5db79278c2..4e61a92555 100644 --- a/include/deal.II/hp/fe_collection.h +++ b/include/deal.II/hp/fe_collection.h @@ -92,13 +92,13 @@ namespace hp /** * Move constructor. */ - FECollection (FECollection &&fe_collection) = default; + FECollection (FECollection &&fe_collection) noexcept = default; /** * Move assignment operator. */ FECollection & - operator= (FECollection &&fe_collection) = default; + operator= (FECollection &&fe_collection) = default; // NOLINT /** * Add a finite element. This function generates a copy of the given diff --git a/include/deal.II/lac/block_indices.h b/include/deal.II/lac/block_indices.h index 1d456b4a03..0a72ecc3bf 100644 --- a/include/deal.II/lac/block_indices.h +++ b/include/deal.II/lac/block_indices.h @@ -78,7 +78,7 @@ public: * Move constructor. Initialize a new object by stealing the internal data of * another BlockIndices object. */ - BlockIndices (BlockIndices &&b); + BlockIndices (BlockIndices &&b) noexcept; /** * Copy constructor. @@ -180,7 +180,7 @@ public: * Move assignment operator. Move another BlockIndices object onto the * current one by transferring its contents. */ - BlockIndices &operator = (BlockIndices &&); + BlockIndices &operator = (BlockIndices &&) noexcept; /** * Compare whether two objects are the same, i.e. whether the number of @@ -304,10 +304,10 @@ BlockIndices::BlockIndices (const std::vector &block_sizes) inline -BlockIndices::BlockIndices (BlockIndices &&b) - : - n_blocks(b.n_blocks), - start_indices(std::move(b.start_indices)) +BlockIndices::BlockIndices (BlockIndices &&b) noexcept +: +n_blocks(b.n_blocks), + start_indices(std::move(b.start_indices)) { b.n_blocks = 0; b.start_indices = std::vector(1, 0); @@ -423,7 +423,7 @@ BlockIndices::operator = (const BlockIndices &b) inline BlockIndices & -BlockIndices::operator = (BlockIndices &&b) +BlockIndices::operator = (BlockIndices &&b) noexcept { start_indices = std::move(b.start_indices); n_blocks = b.n_blocks; diff --git a/include/deal.II/lac/block_vector.h b/include/deal.II/lac/block_vector.h index a636cb9fdd..270e2dd468 100644 --- a/include/deal.II/lac/block_vector.h +++ b/include/deal.II/lac/block_vector.h @@ -113,7 +113,7 @@ public: * Move constructor. Creates a new vector by stealing the internal data of * the given argument vector. */ - BlockVector (BlockVector &&/*v*/) = default; + BlockVector (BlockVector &&/*v*/) noexcept = default; /** * Copy constructor taking a BlockVector of another data type. This will @@ -200,7 +200,7 @@ public: * Move the given vector. This operator replaces the present vector with * the contents of the given argument vector. */ - BlockVector &operator= (BlockVector &&/*v*/) = default; + BlockVector &operator= (BlockVector &&/*v*/) = default; // NOLINT /** * Copy operator for template arguments of different types. Resize the diff --git a/include/deal.II/lac/block_vector_base.h b/include/deal.II/lac/block_vector_base.h index 746d716037..d1bbfd578b 100644 --- a/include/deal.II/lac/block_vector_base.h +++ b/include/deal.II/lac/block_vector_base.h @@ -566,7 +566,7 @@ public: * object if the underlying VectorType is move-constructible, * otherwise they are copied. */ - BlockVectorBase (BlockVectorBase &&/*V*/) = default; + BlockVectorBase (BlockVectorBase &&/*V*/) noexcept = default; /** * Update internal structures after resizing vectors. Whenever you reinited @@ -751,7 +751,7 @@ public: * vector into the current object if `VectorType` is * move-constructible, otherwise copy them. */ - BlockVectorBase &operator= (BlockVectorBase &&/*V*/) = default; + BlockVectorBase &operator= (BlockVectorBase &&/*V*/) = default; // NOLINT /** * Copy operator for template arguments of different types. diff --git a/include/deal.II/lac/sparse_matrix.h b/include/deal.II/lac/sparse_matrix.h index 7bddb45234..7c87cd7022 100644 --- a/include/deal.II/lac/sparse_matrix.h +++ b/include/deal.II/lac/sparse_matrix.h @@ -547,7 +547,7 @@ public: * Move construction allows an object to be returned from a function or * packed into a tuple even when the class cannot be copy-constructed. */ - SparseMatrix (SparseMatrix &&m); + SparseMatrix (SparseMatrix &&m) noexcept; /** * Constructor. Takes the given matrix sparsity structure to represent the @@ -594,7 +594,7 @@ public: * Move assignment operator. This operator replaces the present matrix with * @p m by transferring the internal data of @p m. */ - SparseMatrix &operator = (SparseMatrix &&m); + SparseMatrix &operator = (SparseMatrix &&m) noexcept; /** * Copy operator: initialize the matrix with the identity matrix. This diff --git a/include/deal.II/lac/sparse_matrix.templates.h b/include/deal.II/lac/sparse_matrix.templates.h index 065d93e8bf..3d02a52eda 100644 --- a/include/deal.II/lac/sparse_matrix.templates.h +++ b/include/deal.II/lac/sparse_matrix.templates.h @@ -72,12 +72,12 @@ SparseMatrix::SparseMatrix (const SparseMatrix &m) template -SparseMatrix::SparseMatrix (SparseMatrix &&m) - : - Subscriptor(std::move(m)), - cols(m.cols), - val(std::move(m.val)), - max_len(m.max_len) +SparseMatrix::SparseMatrix (SparseMatrix &&m) noexcept +: +Subscriptor(std::move(m)), + cols(m.cols), + val(std::move(m.val)), + max_len(m.max_len) { m.cols = nullptr; m.val = nullptr; @@ -104,7 +104,7 @@ SparseMatrix::operator = (const SparseMatrix &m) template SparseMatrix & -SparseMatrix::operator = (SparseMatrix &&m) +SparseMatrix::operator = (SparseMatrix &&m) noexcept { cols = m.cols; val = std::move(m.val); diff --git a/include/deal.II/lac/trilinos_parallel_block_vector.h b/include/deal.II/lac/trilinos_parallel_block_vector.h index f5061956cf..169e403810 100644 --- a/include/deal.II/lac/trilinos_parallel_block_vector.h +++ b/include/deal.II/lac/trilinos_parallel_block_vector.h @@ -126,7 +126,7 @@ namespace TrilinosWrappers * Move constructor. Creates a new vector by stealing the internal data * of the vector @p v. */ - BlockVector (BlockVector &&v); + BlockVector (BlockVector &&v) noexcept; /** * Creates a block vector consisting of num_blocks components, @@ -155,7 +155,7 @@ namespace TrilinosWrappers * Move the given vector. This operator replaces the present vector with * @p v by efficiently swapping the internal data structures. */ - BlockVector &operator= (BlockVector &&v); + BlockVector &operator= (BlockVector &&v) noexcept; /** * Another copy function. This one takes a deal.II block vector and @@ -343,7 +343,7 @@ namespace TrilinosWrappers inline - BlockVector::BlockVector (BlockVector &&v) + BlockVector::BlockVector (BlockVector &&v) noexcept { // initialize a minimal, valid object and swap reinit (0); diff --git a/include/deal.II/lac/trilinos_sparse_matrix.h b/include/deal.II/lac/trilinos_sparse_matrix.h index 6e41ef4752..5f3e0e0832 100644 --- a/include/deal.II/lac/trilinos_sparse_matrix.h +++ b/include/deal.II/lac/trilinos_sparse_matrix.h @@ -568,7 +568,7 @@ namespace TrilinosWrappers * Move constructor. Create a new sparse matrix by stealing the internal * data. */ - SparseMatrix (SparseMatrix &&other); + SparseMatrix (SparseMatrix &&other) noexcept; /** * Copy constructor is deleted. diff --git a/include/deal.II/lac/trilinos_sparsity_pattern.h b/include/deal.II/lac/trilinos_sparsity_pattern.h index bfec6fe149..8dbcb27f0f 100644 --- a/include/deal.II/lac/trilinos_sparsity_pattern.h +++ b/include/deal.II/lac/trilinos_sparsity_pattern.h @@ -318,7 +318,7 @@ namespace TrilinosWrappers * Move constructor. Create a new sparse matrix by stealing the internal * data. */ - SparsityPattern (SparsityPattern &&other); + SparsityPattern (SparsityPattern &&other) noexcept; /** * Copy constructor. Sets the calling sparsity pattern to be the same as diff --git a/include/deal.II/lac/trilinos_vector.h b/include/deal.II/lac/trilinos_vector.h index 3ef9306a86..989a2d5655 100644 --- a/include/deal.II/lac/trilinos_vector.h +++ b/include/deal.II/lac/trilinos_vector.h @@ -501,7 +501,7 @@ namespace TrilinosWrappers * Move constructor. Creates a new vector by stealing the internal data * of the vector @p v. */ - Vector (Vector &&v); + Vector (Vector &&v) noexcept; /** * Destructor. @@ -646,7 +646,7 @@ namespace TrilinosWrappers * Move the given vector. This operator replaces the present vector with * @p v by efficiently swapping the internal data structures. */ - Vector &operator= (Vector &&v); + Vector &operator= (Vector &&v) noexcept; /** * Another copy function. This one takes a deal.II vector and copies it diff --git a/include/deal.II/lac/vector.h b/include/deal.II/lac/vector.h index e52a569b43..7ead70f3e2 100644 --- a/include/deal.II/lac/vector.h +++ b/include/deal.II/lac/vector.h @@ -151,7 +151,7 @@ public: * Move constructor. Creates a new vector by stealing the internal data of * the vector @p v. */ - Vector (Vector &&v); + Vector (Vector &&v) noexcept; /** * Copy constructor taking a vector of another data type. This will fail if @@ -341,7 +341,7 @@ public: * the internal data of the vector @p v and resets @p v to the state it would * have after being newly default-constructed. */ - Vector &operator= (Vector &&v); + Vector &operator= (Vector &&v) noexcept; /** * Copy the given vector. Resize the present vector if necessary. diff --git a/include/deal.II/lac/vector.templates.h b/include/deal.II/lac/vector.templates.h index 393817135f..0dea60137f 100644 --- a/include/deal.II/lac/vector.templates.h +++ b/include/deal.II/lac/vector.templates.h @@ -60,13 +60,13 @@ Vector::Vector (const Vector &v) template -Vector::Vector (Vector &&v) - : - Subscriptor(std::move(v)), - vec_size(v.vec_size), - max_vec_size(v.max_vec_size), - values(std::move(v.values)), - thread_loop_partitioner(std::move(v.thread_loop_partitioner)) +Vector::Vector (Vector &&v) noexcept +: +Subscriptor(std::move(v)), + vec_size(v.vec_size), + max_vec_size(v.max_vec_size), + values(std::move(v.values)), + thread_loop_partitioner(std::move(v.thread_loop_partitioner)) { v.vec_size = 0; v.max_vec_size = 0; @@ -220,7 +220,7 @@ Vector::operator= (const Vector &v) template inline Vector & -Vector::operator= (Vector &&v) +Vector::operator= (Vector &&v) noexcept { Subscriptor::operator=(std::move(v)); diff --git a/include/deal.II/lac/vector_memory.h b/include/deal.II/lac/vector_memory.h index 2784ecb4db..46587fceb3 100644 --- a/include/deal.II/lac/vector_memory.h +++ b/include/deal.II/lac/vector_memory.h @@ -200,13 +200,13 @@ public: * Move constructor: this creates a new Pointer by stealing the internal * data owned by @p p. */ - Pointer(Pointer &&p) = default; + Pointer(Pointer &&p) noexcept = default; /** * Move operator: this releases the vector owned by the current Pointer * and then steals the internal data owned by @p p. */ - Pointer &operator = (Pointer &&p) = default; + Pointer &operator = (Pointer &&p) noexcept = default; /** * Constructor. This constructor automatically allocates a vector from diff --git a/include/deal.II/particles/particle.h b/include/deal.II/particles/particle.h index 6ea1ee4a66..41529e493c 100644 --- a/include/deal.II/particles/particle.h +++ b/include/deal.II/particles/particle.h @@ -154,7 +154,7 @@ namespace Particles * Move constructor for Particle, creates a particle from an existing * one by stealing its state. */ - Particle (Particle &&particle); + Particle (Particle &&particle) noexcept; /** * Copy assignment operator. @@ -164,7 +164,7 @@ namespace Particles /** * Move assignment operator. */ - Particle &operator=(Particle &&particle); + Particle &operator=(Particle &&particle) noexcept; /** * Destructor. Releases the property handle if it is valid, and diff --git a/source/base/subscriptor.cc b/source/base/subscriptor.cc index ce1f147deb..07aad6d59a 100644 --- a/source/base/subscriptor.cc +++ b/source/base/subscriptor.cc @@ -46,10 +46,10 @@ Subscriptor::Subscriptor (const Subscriptor &) -Subscriptor::Subscriptor (Subscriptor &&subscriptor) - : - counter(0), - object_info (subscriptor.object_info) +Subscriptor::Subscriptor (Subscriptor &&subscriptor) noexcept +: +counter(0), + object_info (subscriptor.object_info) { subscriptor.check_no_subscribers(); } @@ -135,7 +135,7 @@ Subscriptor &Subscriptor::operator = (const Subscriptor &s) -Subscriptor &Subscriptor::operator = (Subscriptor &&s) +Subscriptor &Subscriptor::operator = (Subscriptor &&s) noexcept { s.check_no_subscribers(); object_info = s.object_info; diff --git a/source/grid/tria.cc b/source/grid/tria.cc index fc7b9aa812..16a67f5242 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -8829,22 +8829,22 @@ Triangulation (const MeshSmoothing smooth_grid, template Triangulation:: -Triangulation (Triangulation &&tria) - : - Subscriptor(tria), - smooth_grid(tria.smooth_grid), - periodic_face_pairs_level_0(std::move(tria.periodic_face_pairs_level_0)), - periodic_face_map(std::move(tria.periodic_face_map)), - levels(std::move(tria.levels)), - faces(std::move(tria.faces)), - vertices(std::move(tria.vertices)), - vertices_used(std::move(tria.vertices_used)), - manifold(std::move(tria.manifold)), - anisotropic_refinement(tria.anisotropic_refinement), - check_for_distorted_cells(tria.check_for_distorted_cells), - number_cache(tria.number_cache), - vertex_to_boundary_id_map_1d(std::move(tria.vertex_to_boundary_id_map_1d)), - vertex_to_manifold_id_map_1d(std::move(tria.vertex_to_manifold_id_map_1d)) +Triangulation (Triangulation &&tria) noexcept +: +Subscriptor(std::move(tria)), + smooth_grid(tria.smooth_grid), + periodic_face_pairs_level_0(std::move(tria.periodic_face_pairs_level_0)), + periodic_face_map(std::move(tria.periodic_face_map)), + levels(std::move(tria.levels)), + faces(std::move(tria.faces)), + vertices(std::move(tria.vertices)), + vertices_used(std::move(tria.vertices_used)), + manifold(std::move(tria.manifold)), + anisotropic_refinement(tria.anisotropic_refinement), + check_for_distorted_cells(tria.check_for_distorted_cells), + number_cache(std::move(tria.number_cache)), + vertex_to_boundary_id_map_1d(std::move(tria.vertex_to_boundary_id_map_1d)), + vertex_to_manifold_id_map_1d(std::move(tria.vertex_to_manifold_id_map_1d)) { tria.number_cache = internal::Triangulation::NumberCache(); } @@ -8852,7 +8852,7 @@ Triangulation (Triangulation &&tria) template Triangulation & -Triangulation::operator= (Triangulation &&tria) +Triangulation::operator= (Triangulation &&tria) noexcept { Subscriptor::operator=(std::move(tria)); diff --git a/source/lac/trilinos_block_vector.cc b/source/lac/trilinos_block_vector.cc index 1928290003..86fb8d2422 100644 --- a/source/lac/trilinos_block_vector.cc +++ b/source/lac/trilinos_block_vector.cc @@ -59,7 +59,7 @@ namespace TrilinosWrappers BlockVector & - BlockVector::operator= (BlockVector &&v) + BlockVector::operator= (BlockVector &&v) noexcept { swap(v); return *this; diff --git a/source/lac/trilinos_sparse_matrix.cc b/source/lac/trilinos_sparse_matrix.cc index 48ed68b1bb..3b71264424 100644 --- a/source/lac/trilinos_sparse_matrix.cc +++ b/source/lac/trilinos_sparse_matrix.cc @@ -355,14 +355,14 @@ namespace TrilinosWrappers - SparseMatrix::SparseMatrix (SparseMatrix &&other) - : - column_space_map(std::move(other.column_space_map)), - matrix(std::move(other.matrix)), - nonlocal_matrix(std::move(other.nonlocal_matrix)), - nonlocal_matrix_exporter(std::move(other.nonlocal_matrix_exporter)), - last_action(other.last_action), - compressed(other.compressed) + SparseMatrix::SparseMatrix (SparseMatrix &&other) noexcept +: + column_space_map(std::move(other.column_space_map)), + matrix(std::move(other.matrix)), + nonlocal_matrix(std::move(other.nonlocal_matrix)), + nonlocal_matrix_exporter(std::move(other.nonlocal_matrix_exporter)), + last_action(other.last_action), + compressed(other.compressed) { other.last_action = Zero; other.compressed = false; diff --git a/source/lac/trilinos_sparsity_pattern.cc b/source/lac/trilinos_sparsity_pattern.cc index 381e103d59..51e788b246 100644 --- a/source/lac/trilinos_sparsity_pattern.cc +++ b/source/lac/trilinos_sparsity_pattern.cc @@ -143,12 +143,12 @@ namespace TrilinosWrappers - SparsityPattern::SparsityPattern (SparsityPattern &&other) - : - Subscriptor(std::move(other)), - column_space_map(std::move(other.column_space_map)), - graph(std::move(other.graph)), - nonlocal_graph(std::move(other.nonlocal_graph)) + SparsityPattern::SparsityPattern (SparsityPattern &&other) noexcept +: + Subscriptor(std::move(other)), + column_space_map(std::move(other.column_space_map)), + graph(std::move(other.graph)), + nonlocal_graph(std::move(other.nonlocal_graph)) {} diff --git a/source/lac/trilinos_vector.cc b/source/lac/trilinos_vector.cc index 5ff9112060..3c1755e2ef 100644 --- a/source/lac/trilinos_vector.cc +++ b/source/lac/trilinos_vector.cc @@ -92,8 +92,9 @@ namespace TrilinosWrappers - Vector::Vector (Vector &&v) - : Vector() + Vector::Vector (Vector &&v) noexcept +: + Vector() { // initialize a minimal, valid object and swap swap(v); @@ -467,7 +468,7 @@ namespace TrilinosWrappers - Vector &Vector::operator= (Vector &&v) + Vector &Vector::operator= (Vector &&v) noexcept { swap(v); return *this; diff --git a/source/particles/particle.cc b/source/particles/particle.cc index 00a579fc1b..587a2573af 100644 --- a/source/particles/particle.cc +++ b/source/particles/particle.cc @@ -98,13 +98,13 @@ namespace Particles template - Particle::Particle (Particle &&particle) - : - location (particle.location), - reference_location(particle.reference_location), - id (particle.id), - property_pool(particle.property_pool), - properties(particle.properties) + Particle::Particle (Particle &&particle) noexcept +: + location (std::move(particle.location)), + reference_location(std::move(particle.reference_location)), + id (std::move(particle.id)), + property_pool(std::move(particle.property_pool)), + properties(std::move(particle.properties)) { particle.properties = PropertyPool::invalid_handle; } @@ -140,7 +140,7 @@ namespace Particles template Particle & - Particle::operator=(Particle &&particle) + Particle::operator=(Particle &&particle) noexcept { if (this != &particle) {