]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Prefer nullptr 5297/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 21 Oct 2017 14:25:36 +0000 (16:25 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sat, 21 Oct 2017 14:29:36 +0000 (16:29 +0200)
include/deal.II/base/numbers.h
include/deal.II/fe/fe_tools_extrapolate.templates.h
include/deal.II/grid/tria_accessor.h
include/deal.II/lac/la_parallel_block_vector.templates.h
include/deal.II/lac/la_parallel_vector.templates.h
include/deal.II/lac/la_vector.templates.h
source/distributed/p4est_wrappers.cc

index c25eadb659261aeec021f64c409c07314a3ca272..2c03b71cf6bdbae1c0d068464511a3f52d402afb 100644 (file)
@@ -446,7 +446,7 @@ namespace internal
            typename std::enable_if<
            !std::is_same<typename std::decay<T>::type,typename std::decay<F>::type>::value &&
            std::is_constructible<T,F>::value
-           >::type * = 0)
+           >::type * = nullptr)
     {
       return T(f);
     }
index 9d1f24d457d01993870f4008052a79c34b740985..6483d48473564cc72c275ee1f3ac24433611c13b 100644 (file)
@@ -1460,7 +1460,7 @@ namespace FETools
       {
         const parallel::distributed::Triangulation<dim,spacedim> *parallel_tria =
           dynamic_cast<const parallel::distributed::Triangulation<dim,spacedim>*>(&dh.get_triangulation());
-        Assert (parallel_tria !=0, ExcNotImplemented());
+        Assert (parallel_tria !=nullptr, ExcNotImplemented());
 
         const IndexSet &locally_owned_dofs = dh.locally_owned_dofs();
         vector.reinit(locally_owned_dofs, parallel_tria->get_communicator());
index 81828d2a3b594bfb283ef37284b42ad15b765c4e..4e7883b149b94fba78812b70b654c3ab0d377301 100644 (file)
@@ -511,10 +511,10 @@ public:
    * semantic sense, and we generate an exception when such an object is
    * actually generated.
    */
-  InvalidAccessor (const Triangulation<dim,spacedim> *parent     =  0,
-                   const int                 level      = -1,
-                   const int                 index      = -1,
-                   const AccessorData       *local_data =  0);
+  InvalidAccessor (const Triangulation<dim,spacedim> *parent     =  nullptr,
+                   const int                          level      = -1,
+                   const int                          index      = -1,
+                   const AccessorData                *local_data =  nullptr);
 
   /**
    * Copy constructor.  This class is used for iterators that do not make
index 8902adcd7a20f98ba2a83bc7fca87f270f459ff6..d4271150652d53a7216258174ad7961d148c172c 100644 (file)
@@ -296,7 +296,7 @@ namespace LinearAlgebra
     BlockVector<Number>::reinit(const VectorSpaceVector<Number> &V,
                                 const bool omit_zeroing_entries)
     {
-      Assert(dynamic_cast<const BlockVector<Number> *>(&V)!=NULL,
+      Assert(dynamic_cast<const BlockVector<Number> *>(&V)!=nullptr,
              ExcVectorTypeNotCompatible());
       const BlockVector<Number> &down_V = dynamic_cast<const BlockVector<Number> &>(V);
       reinit(down_V, omit_zeroing_entries);
index c120889a0e286de2a653571e0f33b5604cc0702f..2e65d4e02f8278ca093c0c5885352f9e12538978 100644 (file)
@@ -742,7 +742,7 @@ namespace LinearAlgebra
                                 const bool omit_zeroing_entries)
     {
       // Downcast. Throws an exception if invalid.
-      Assert(dynamic_cast<const Vector<Number> *>(&V)!=NULL,
+      Assert(dynamic_cast<const Vector<Number> *>(&V)!=nullptr,
              ExcVectorTypeNotCompatible());
       const Vector<Number> &down_V = dynamic_cast<const Vector<Number> &>(V);
 
index ecedcd94f5a0b59ed4777aa33599665623de590e..40c5ae2e6a93947df65c323c931fb5883feb77f8 100644 (file)
@@ -58,7 +58,7 @@ namespace LinearAlgebra
                               const bool omit_zeroing_entries)
   {
     // Check that casting will work.
-    Assert(dynamic_cast<const Vector<Number>*>(&V)!=NULL, ExcVectorTypeNotCompatible());
+    Assert(dynamic_cast<const Vector<Number>*>(&V)!=nullptr, ExcVectorTypeNotCompatible());
 
     // Downcast V. If fails, throws an exception.
     const Vector<Number> &down_V = dynamic_cast<const Vector<Number>&>(V);
index eb54838bed1268dbfd3460c45db8bfe3e8bffdf6..e2f6f22a3901f85df40c896aff54cd1bae61c815 100644 (file)
@@ -467,7 +467,7 @@ namespace internal
           p4est_iterate (reinterpret_cast<dealii::internal::p4est::types<2>::forest *>(parallel_forest),
                          reinterpret_cast<dealii::internal::p4est::types<2>::ghost *>(parallel_ghost),
                          static_cast<void *>(&fg),
-                         NULL, find_ghosts_face<2,spacedim>, find_ghosts_corner<2,spacedim>);
+                         nullptr, find_ghosts_face<2,spacedim>, find_ghosts_corner<2,spacedim>);
           break;
 
         case 3:

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.