]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compilation warning: &DoFCellAccessor::get_fe() == 0 1214/head
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 29 Jul 2015 14:53:31 +0000 (16:53 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Wed, 29 Jul 2015 14:53:31 +0000 (16:53 +0200)
reference cannot be bound to dereferenced null pointer in well-defined
C++ code; comparison may be assumed to always evaluate to true

include/deal.II/dofs/dof_accessor.templates.h

index 01459199f3693517ff5e5f4481499f1f4a9cd1c5..3883cc2b29bc3cf40b89a7b864f91242c0b1bd33 100644 (file)
@@ -2822,8 +2822,6 @@ namespace internal
         typedef dealii::DoFAccessor<dim,DoFHandler<dim,spacedim>, level_dof_access> BaseClass;
         Assert (accessor.dof_handler != 0,
                 typename BaseClass::ExcInvalidObject());
-        Assert (&accessor.get_fe() != 0,
-                typename BaseClass::ExcInvalidObject());
         Assert (static_cast<unsigned int>(local_source_end-local_source_begin)
                 ==
                 accessor.get_fe().dofs_per_cell,
@@ -2856,8 +2854,6 @@ namespace internal
         typedef dealii::DoFAccessor<dim,DoFHandler<dim,spacedim>, level_dof_access> BaseClass;
         Assert (accessor.dof_handler != 0,
                 typename BaseClass::ExcInvalidObject());
-        Assert (&accessor.get_fe() != 0,
-                typename BaseClass::ExcInvalidObject());
         Assert (local_source_end-local_source_begin == accessor.get_fe().dofs_per_cell,
                 typename BaseClass::ExcVectorDoesNotMatch());
         Assert (accessor.dof_handler->n_dofs() == global_destination.size(),
@@ -2889,8 +2885,6 @@ namespace internal
         typedef dealii::DoFAccessor<dim,DoFHandler<dim,spacedim>, level_dof_access> BaseClass;
         Assert (accessor.dof_handler != 0,
                 typename BaseClass::ExcInvalidObject());
-        Assert (&accessor.get_fe() != 0,
-                typename BaseClass::ExcInvalidObject());
         Assert (local_source_end-local_source_begin == accessor.get_fe().dofs_per_cell,
                 typename BaseClass::ExcVectorDoesNotMatch());
         Assert (accessor.dof_handler->n_dofs() == global_destination.size(),
@@ -2923,8 +2917,6 @@ namespace internal
         typedef dealii::DoFAccessor<dim,DoFHandler<dim,spacedim>, level_dof_access> BaseClass;
         Assert (accessor.dof_handler != 0,
                 typename BaseClass::ExcInvalidObject());
-        Assert (&accessor.get_fe() != 0,
-                typename BaseClass::ExcInvalidObject());
         Assert (local_source_end-local_source_begin == accessor.get_fe().dofs_per_cell,
                 typename BaseClass::ExcVectorDoesNotMatch());
         Assert (accessor.dof_handler->n_dofs() == global_destination.size(),
@@ -2955,8 +2947,6 @@ namespace internal
         typedef dealii::DoFAccessor<dim,DoFHandler<dim,spacedim>, level_dof_access> BaseClass;
         Assert (accessor.dof_handler != 0,
                 typename BaseClass::ExcInvalidObject());
-        Assert (&accessor.get_fe() != 0,
-                typename BaseClass::ExcInvalidObject());
         Assert (local_source.m() == accessor.get_fe().dofs_per_cell,
                 typename BaseClass::ExcMatrixDoesNotMatch());
         Assert (local_source.n() == accessor.get_fe().dofs_per_cell,
@@ -2992,8 +2982,6 @@ namespace internal
         typedef dealii::DoFAccessor<dim,DoFHandler<dim,spacedim>, level_dof_access> BaseClass;
         Assert (accessor.dof_handler != 0,
                 typename BaseClass::ExcInvalidObject());
-        Assert (&accessor.get_fe() != 0,
-                typename BaseClass::ExcInvalidObject());
         Assert (local_source.m() == accessor.get_fe().dofs_per_cell,
                 typename BaseClass::ExcMatrixDoesNotMatch());
         Assert (local_source.n() == accessor.get_fe().dofs_per_cell,
@@ -3030,8 +3018,6 @@ namespace internal
         typedef dealii::DoFAccessor<dim,DoFHandler<dim,spacedim>, level_dof_access> BaseClass;
         Assert (accessor.dof_handler != 0,
                 typename BaseClass::ExcInvalidObject());
-        Assert (&accessor.get_fe() != 0,
-                typename BaseClass::ExcInvalidObject());
         Assert (local_matrix.m() == accessor.get_fe().dofs_per_cell,
                 typename BaseClass::ExcMatrixDoesNotMatch());
         Assert (local_matrix.n() == accessor.get_fe().dofs_per_cell,
@@ -3075,8 +3061,6 @@ namespace internal
         typedef dealii::DoFAccessor<dim,DoFHandler<dim,spacedim>, level_dof_access> BaseClass;
         Assert (accessor.dof_handler != 0,
                 typename BaseClass::ExcInvalidObject());
-        Assert (&accessor.get_fe() != 0,
-                typename BaseClass::ExcInvalidObject());
         Assert (local_matrix.m() == accessor.get_fe().dofs_per_cell,
                 typename BaseClass::ExcMatrixDoesNotMatch());
         Assert (local_matrix.n() == accessor.get_fe().dofs_per_cell,

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.