diff --git a/examples/opmrst_inspect.cpp b/examples/opmrst_inspect.cpp index a2bd6ac18..2bd31f2c0 100644 --- a/examples/opmrst_inspect.cpp +++ b/examples/opmrst_inspect.cpp @@ -40,9 +40,9 @@ int main(int argc, char** argv) } #if HAVE_MPI - Opm::Parallel::Communication comm(MPI_COMM_SELF); + Opm::Parallel::Communication comm{MPI_COMM_SELF}; #else - Opm::Parallel::Communication comm(); + Opm::Parallel::Communication comm{}; #endif Dune::MPIHelper::instance(argc, argv); diff --git a/opm/simulators/utils/HDF5File.cpp b/opm/simulators/utils/HDF5File.cpp index 4818c63a8..90d00ef44 100644 --- a/opm/simulators/utils/HDF5File.cpp +++ b/opm/simulators/utils/HDF5File.cpp @@ -26,6 +26,7 @@ #include +#include #include #include @@ -61,7 +62,7 @@ HDF5File::HDF5File(const std::string& fileName, acc_tpl = H5Pcreate(H5P_FILE_ACCESS); H5Pset_fapl_mpio(acc_tpl, comm_, info); #else - assert(0); // should be unreachable + assert(false); // should be unreachable #endif } diff --git a/tests/test_HDF5File.cpp b/tests/test_HDF5File.cpp index 097bc9be3..e765ad79b 100644 --- a/tests/test_HDF5File.cpp +++ b/tests/test_HDF5File.cpp @@ -30,17 +30,15 @@ #include #include -using namespace Opm; - BOOST_AUTO_TEST_CASE(ReadWrite) { auto path = std::filesystem::temp_directory_path() / Opm::unique_path("hdf5test%%%%%"); std::filesystem::create_directory(path); auto rwpath = (path / "rw.hdf5").string(); #if HAVE_MPI - Parallel::Communication comm(MPI_COMM_SELF); + Opm::Parallel::Communication comm{MPI_COMM_SELF}; #else - Parallel::Communcation comm; + Opm::Parallel::Communication comm{}; #endif const std::vector test_data{1,2,3,4,5,6,8,9}; { @@ -61,9 +59,9 @@ BOOST_AUTO_TEST_CASE(ReadWrite) BOOST_AUTO_TEST_CASE(ThrowOpenNonexistent) { #if HAVE_MPI - Parallel::Communication comm(MPI_COMM_SELF); + Opm::Parallel::Communication comm{MPI_COMM_SELF}; #else - Parallel::Communcation comm; + Opm::Parallel::Communication comm{}; #endif BOOST_CHECK_THROW(Opm::HDF5File out_file("no_such_file.hdf5", Opm::HDF5File::OpenMode::READ, comm), std::runtime_error); } @@ -74,9 +72,9 @@ BOOST_AUTO_TEST_CASE(ReadNonExistentDset) std::filesystem::create_directory(path); auto rwpath = (path / "existent_dset.hdf5").string(); #if HAVE_MPI - Parallel::Communication comm(MPI_COMM_SELF); + Opm::Parallel::Communication comm{MPI_COMM_SELF}; #else - Parallel::Communcation comm; + Opm::Parallel::Communication comm{}; #endif const std::vector test_data{1,2,3,4,5,6,8,9}; { @@ -101,9 +99,9 @@ BOOST_AUTO_TEST_CASE(WriteExistentDset) std::filesystem::create_directory(path); auto rwpath = (path / "existent_dset.hdf5").string(); #if HAVE_MPI - Parallel::Communication comm(MPI_COMM_SELF); + Opm::Parallel::Communication comm{MPI_COMM_SELF}; #else - Parallel::Communcation comm; + Opm::Parallel::Communication comm{}; #endif const std::vector test_data{1,2,3,4,5,6,8,9}; { @@ -121,9 +119,9 @@ BOOST_AUTO_TEST_CASE(List) std::filesystem::create_directory(path); auto rwpath = (path / "existent_dset.hdf5").string(); #if HAVE_MPI - Parallel::Communication comm(MPI_COMM_SELF); + Opm::Parallel::Communication comm{MPI_COMM_SELF}; #else - Parallel::Communcation comm; + Opm::Parallel::Communication comm{}; #endif const std::vector test_data{1,2,3,4,5,6,8,9}; { diff --git a/tests/test_HDF5Serializer.cpp b/tests/test_HDF5Serializer.cpp index b0e765dbb..4759cef86 100644 --- a/tests/test_HDF5Serializer.cpp +++ b/tests/test_HDF5Serializer.cpp @@ -24,6 +24,7 @@ #include #include +#include #define BOOST_TEST_MODULE HDF5FileTest #define BOOST_TEST_NO_MAIN @@ -42,7 +43,7 @@ BOOST_AUTO_TEST_CASE(Header) #if HAVE_MPI Parallel::Communication comm(MPI_COMM_SELF); #else - Parallel::Communcation comm; + Parallel::Communication comm{}; #endif std::array output{"foo", "bar", "foobar", "bob", "bobbar"}; { @@ -72,7 +73,7 @@ BOOST_AUTO_TEST_CASE(WriteRead) #if HAVE_MPI Parallel::Communication comm(MPI_COMM_SELF); #else - Parallel::Communcation comm; + Parallel::Communication comm{}; #endif auto output = Group::serializationTestObject(); {