From 81f3bd0acfbe1a8fa2048a4ffa2176f989b1d259 Mon Sep 17 00:00:00 2001 From: David Wells Date: Sat, 9 Dec 2017 13:02:59 -0500 Subject: [PATCH] Prefer nullptr to the zero literal. --- include/deal.II/dofs/dof_accessor.templates.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/deal.II/dofs/dof_accessor.templates.h b/include/deal.II/dofs/dof_accessor.templates.h index 55ac6ec648..d22c7330f2 100644 --- a/include/deal.II/dofs/dof_accessor.templates.h +++ b/include/deal.II/dofs/dof_accessor.templates.h @@ -1410,7 +1410,7 @@ namespace internal Assert ( (fe_index != dealii::hp::DoFHandler::default_fe_index), ExcMessage ("You need to specify a FE index when working " "with hp DoFHandlers")); - Assert (dof_handler.finite_elements != 0, + Assert (dof_handler.finite_elements != nullptr, ExcMessage ("No finite element collection is associated with " "this DoFHandler")); Assert (fe_index < dof_handler.finite_elements->size(), @@ -2543,7 +2543,7 @@ void DoFAccessor<0,DoFHandlerType<1,spacedim>, level_dof_access>::copy_from (const TriaAccessorBase<0,1,spacedim> &da) { - Assert (this->dof_handler != 0, ExcInvalidObject()); + Assert (this->dof_handler != nullptr, ExcInvalidObject()); BaseClass::copy_from(da); } @@ -3061,7 +3061,7 @@ namespace internal ForwardIterator local_source_end, OutputVector &global_destination) { - Assert (accessor.dof_handler != 0, + Assert (accessor.dof_handler != nullptr, (typename std::decay::type::ExcInvalidObject())); Assert (local_source_end-local_source_begin == accessor.get_fe().dofs_per_cell, (typename std::decay::type::ExcVectorDoesNotMatch())); @@ -3091,7 +3091,7 @@ namespace internal ForwardIterator local_source_end, OutputVector &global_destination) { - Assert (accessor.dof_handler != 0, + Assert (accessor.dof_handler != nullptr, (typename std::decay::type::ExcInvalidObject())); Assert (local_source_end-local_source_begin == accessor.get_fe().dofs_per_cell, (typename std::decay::type::ExcVectorDoesNotMatch())); @@ -3122,7 +3122,7 @@ namespace internal ForwardIterator local_source_end, OutputVector &global_destination) { - Assert (accessor.dof_handler != 0, + Assert (accessor.dof_handler != nullptr, (typename std::decay::type::ExcInvalidObject())); Assert (local_source_end-local_source_begin == accessor.get_fe().dofs_per_cell, (typename std::decay::type::ExcVectorDoesNotMatch())); @@ -3185,7 +3185,7 @@ namespace internal const dealii::FullMatrix &local_source, OutputMatrix &global_destination) { - Assert (accessor.dof_handler != 0, + Assert (accessor.dof_handler != nullptr, (typename std::decay::type::ExcInvalidObject())); Assert (local_source.m() == accessor.get_fe().dofs_per_cell, (typename std::decay::type::ExcMatrixDoesNotMatch())); @@ -3220,7 +3220,7 @@ namespace internal OutputMatrix &global_matrix, OutputVector &global_vector) { - Assert (accessor.dof_handler != 0, + Assert (accessor.dof_handler != nullptr, (typename std::decay::type::ExcInvalidObject())); Assert (local_matrix.m() == accessor.get_fe().dofs_per_cell, (typename std::decay::type::ExcMatrixDoesNotMatch())); @@ -3262,7 +3262,7 @@ namespace internal OutputMatrix &global_matrix, OutputVector &global_vector) { - Assert (accessor.dof_handler != 0, + Assert (accessor.dof_handler != nullptr, (typename std::decay::type::ExcInvalidObject())); Assert (local_matrix.m() == accessor.get_fe().dofs_per_cell, (typename std::decay::type::ExcMatrixDoesNotMatch())); -- 2.39.5