]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use nullptr instead of NULL 5082/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 14 Sep 2017 13:35:31 +0000 (15:35 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 14 Sep 2017 13:43:22 +0000 (15:43 +0200)
source/base/data_out_base.cc
source/base/function_cspline.cc
source/distributed/p4est_wrappers.cc
source/lac/trilinos_epetra_vector.cc

index 3ec7dbf731cf275f16864a80ddd18a2cc4d6361e..becc95f1e82d0c9729aea2a5308b7ab2cda8b638 100644 (file)
@@ -6950,12 +6950,12 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
       // HDF5 only supports 2- or 3-dimensional coordinates
       node_ds_dim[0] = global_node_cell_count[0];
       node_ds_dim[1] = (spacedim<2) ? 2 : spacedim;
-      node_dataspace = H5Screate_simple(2, node_ds_dim, NULL);
+      node_dataspace = H5Screate_simple(2, node_ds_dim, nullptr);
       AssertThrow(node_dataspace >= 0, ExcIO());
 
       cell_ds_dim[0] = global_node_cell_count[1];
       cell_ds_dim[1] = GeometryInfo<dim>::vertices_per_cell;
-      cell_dataspace = H5Screate_simple(2, cell_ds_dim, NULL);
+      cell_dataspace = H5Screate_simple(2, cell_ds_dim, nullptr);
       AssertThrow(cell_dataspace >= 0, ExcIO());
 
       // Create the dataset for the nodes and cells
@@ -6986,13 +6986,13 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
       offset[0] = global_node_cell_offsets[0];
       offset[1] = 0;
 
-      node_memory_dataspace = H5Screate_simple(2, count, NULL);
+      node_memory_dataspace = H5Screate_simple(2, count, nullptr);
       AssertThrow(node_memory_dataspace >= 0, ExcIO());
 
       // Select the hyperslab in the file
       node_file_dataspace = H5Dget_space(node_dataset);
       AssertThrow(node_file_dataspace >= 0, ExcIO());
-      status = H5Sselect_hyperslab(node_file_dataspace, H5S_SELECT_SET, offset, NULL, count, NULL);
+      status = H5Sselect_hyperslab(node_file_dataspace, H5S_SELECT_SET, offset, nullptr, count, nullptr);
       AssertThrow(status >= 0, ExcIO());
 
       // And repeat for cells
@@ -7000,12 +7000,12 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
       count[1] = GeometryInfo<dim>::vertices_per_cell;
       offset[0] = global_node_cell_offsets[1];
       offset[1] = 0;
-      cell_memory_dataspace = H5Screate_simple(2, count, NULL);
+      cell_memory_dataspace = H5Screate_simple(2, count, nullptr);
       AssertThrow(cell_memory_dataspace >= 0, ExcIO());
 
       cell_file_dataspace = H5Dget_space(cell_dataset);
       AssertThrow(cell_file_dataspace >= 0, ExcIO());
-      status = H5Sselect_hyperslab(cell_file_dataspace, H5S_SELECT_SET, offset, NULL, count, NULL);
+      status = H5Sselect_hyperslab(cell_file_dataspace, H5S_SELECT_SET, offset, nullptr, count, nullptr);
       AssertThrow(status >= 0, ExcIO());
 
       // And finally, write the node data
@@ -7074,7 +7074,7 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
       // Create the dataspace for the point data
       node_ds_dim[0] = global_node_cell_count[0];
       node_ds_dim[1] = pt_data_vector_dim;
-      pt_data_dataspace = H5Screate_simple(2, node_ds_dim, NULL);
+      pt_data_dataspace = H5Screate_simple(2, node_ds_dim, nullptr);
       AssertThrow(pt_data_dataspace >= 0, ExcIO());
 
 #if H5Gcreate_vers == 1
@@ -7089,13 +7089,13 @@ void DataOutBase::write_hdf5_parallel (const std::vector<Patch<dim,spacedim> > &
       count[1] = pt_data_vector_dim;
       offset[0] = global_node_cell_offsets[0];
       offset[1] = 0;
-      pt_data_memory_dataspace = H5Screate_simple(2, count, NULL);
+      pt_data_memory_dataspace = H5Screate_simple(2, count, nullptr);
       AssertThrow(pt_data_memory_dataspace >= 0, ExcIO());
 
       // Select the hyperslab in the file
       pt_data_file_dataspace = H5Dget_space(pt_data_dataset);
       AssertThrow(pt_data_file_dataspace >= 0, ExcIO());
-      status = H5Sselect_hyperslab(pt_data_file_dataspace, H5S_SELECT_SET, offset, NULL, count, NULL);
+      status = H5Sselect_hyperslab(pt_data_file_dataspace, H5S_SELECT_SET, offset, nullptr, count, nullptr);
       AssertThrow(status >= 0, ExcIO());
 
       // And finally, write the data
index 92f1015bf6e456d2657fa206fe3182f13c4510b4..72ccbf54c56de2613bfafb4ea43c9b8724409003 100644 (file)
@@ -56,8 +56,8 @@ namespace Functions
   {
     gsl_interp_accel_free (acc);
     gsl_spline_free (cspline);
-    acc = NULL;
-    cspline = NULL;
+    acc = nullptr;
+    cspline = nullptr;
   }
 
 
index 155d0e072948ef0c1bad2f198c56bcbbbf3c23ff..eb54838bed1268dbfd3460c45db8bfe3e8bffdf6 100644 (file)
@@ -474,7 +474,7 @@ namespace internal
           p8est_iterate (reinterpret_cast<dealii::internal::p4est::types<3>::forest *>(parallel_forest),
                          reinterpret_cast<dealii::internal::p4est::types<3>::ghost *>(parallel_ghost),
                          static_cast<void *>(&fg),
-                         NULL, find_ghosts_face<3,3>, find_ghosts_edge<3,3>, find_ghosts_corner<3,3>);
+                         nullptr, find_ghosts_face<3,3>, find_ghosts_edge<3,3>, find_ghosts_corner<3,3>);
           break;
 
         default:
index c6a0984c5707e033ec477a00e522ba02e01367a4..40ee86075dd4ae6e21d5317b7d1dc267c1ca814a 100644 (file)
@@ -82,7 +82,7 @@ namespace LinearAlgebra
                         const bool omit_zeroing_entries)
     {
       // Check that casting will work.
-      Assert(dynamic_cast<const Vector *>(&V)!=NULL, ExcVectorTypeNotCompatible());
+      Assert(dynamic_cast<const Vector *>(&V)!=nullptr, ExcVectorTypeNotCompatible());
 
       // Downcast V. If fails, throws an exception.
       const Vector &down_V = dynamic_cast<const Vector &>(V);

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.