From 783f992f0ca37480ce18c9d6bd74cc73e3f85a92 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 27 Sep 2017 10:57:05 -0600 Subject: [PATCH] Prefer std::make_shared() over operator new(). --- source/dofs/dof_tools_constraints.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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(); -- 2.39.5