From: Wolfgang Bangerth Date: Wed, 27 Sep 2017 16:57:05 +0000 (-0600) Subject: Prefer std::make_shared() over operator new(). X-Git-Tag: v9.0.0-rc1~1016^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F5164%2Fhead;p=dealii.git Prefer std::make_shared() over operator new(). --- diff --git a/source/dofs/dof_tools_constraints.cc b/source/dofs/dof_tools_constraints.cc index 4b09056159..67a74aef7e 100644 --- a/source/dofs/dof_tools_constraints.cc +++ b/source/dofs/dof_tools_constraints.cc @@ -313,7 +313,7 @@ namespace DoFTools { if (master_dof_mask == nullptr) { - master_dof_mask.reset (new std::vector (fe1.dofs_per_face)); + master_dof_mask = std::make_shared > (fe1.dofs_per_face); select_master_dofs_for_face_restriction (fe1, fe2, face_interpolation_matrix, @@ -337,8 +337,8 @@ namespace DoFTools { if (matrix == nullptr) { - matrix.reset (new FullMatrix (fe2.dofs_per_face, - fe1.dofs_per_face)); + matrix = std::make_shared > (fe2.dofs_per_face, + fe1.dofs_per_face); fe1.get_face_interpolation_matrix (fe2, *matrix); } @@ -358,8 +358,8 @@ namespace DoFTools { if (matrix == nullptr) { - matrix.reset (new FullMatrix (fe2.dofs_per_face, - fe1.dofs_per_face)); + matrix = std::make_shared > (fe2.dofs_per_face, + fe1.dofs_per_face); fe1.get_subface_interpolation_matrix (fe2, subface, *matrix); @@ -385,7 +385,7 @@ namespace DoFTools if (split_matrix == nullptr) { - split_matrix.reset (new std::pair,FullMatrix >()); + split_matrix = std::make_shared,FullMatrix > >(); const unsigned int n_master_dofs = face_interpolation_matrix.n(); const unsigned int n_dofs = face_interpolation_matrix.m();