From b9a8daa12e9dd0085522e31954048ad8c9911202 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 14 Sep 2017 15:35:31 +0200 Subject: [PATCH] Use nullptr instead of NULL --- source/base/data_out_base.cc | 18 +++++++++--------- source/base/function_cspline.cc | 4 ++-- source/distributed/p4est_wrappers.cc | 2 +- source/lac/trilinos_epetra_vector.cc | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 3ec7dbf731..becc95f1e8 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -6950,12 +6950,12 @@ void DataOutBase::write_hdf5_parallel (const std::vector > & // 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::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 > & 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 > & count[1] = GeometryInfo::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 > & // 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 > & 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 diff --git a/source/base/function_cspline.cc b/source/base/function_cspline.cc index 92f1015bf6..72ccbf54c5 100644 --- a/source/base/function_cspline.cc +++ b/source/base/function_cspline.cc @@ -56,8 +56,8 @@ namespace Functions { gsl_interp_accel_free (acc); gsl_spline_free (cspline); - acc = NULL; - cspline = NULL; + acc = nullptr; + cspline = nullptr; } diff --git a/source/distributed/p4est_wrappers.cc b/source/distributed/p4est_wrappers.cc index 155d0e0729..eb54838bed 100644 --- a/source/distributed/p4est_wrappers.cc +++ b/source/distributed/p4est_wrappers.cc @@ -474,7 +474,7 @@ namespace internal p8est_iterate (reinterpret_cast::forest *>(parallel_forest), reinterpret_cast::ghost *>(parallel_ghost), static_cast(&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: diff --git a/source/lac/trilinos_epetra_vector.cc b/source/lac/trilinos_epetra_vector.cc index c6a0984c57..40ee86075d 100644 --- a/source/lac/trilinos_epetra_vector.cc +++ b/source/lac/trilinos_epetra_vector.cc @@ -82,7 +82,7 @@ namespace LinearAlgebra const bool omit_zeroing_entries) { // Check that casting will work. - Assert(dynamic_cast(&V)!=NULL, ExcVectorTypeNotCompatible()); + Assert(dynamic_cast(&V)!=nullptr, ExcVectorTypeNotCompatible()); // Downcast V. If fails, throws an exception. const Vector &down_V = dynamic_cast(V); -- 2.39.5