From 37d57abd566d796ba8b816208fe69b3618963c6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20P=C3=B6schel?= Date: Wed, 10 Jul 2024 13:14:21 +0200 Subject: [PATCH] Adapt constructors for installation without ADIOS2/HDF5 --- src/IO/ADIOS/ADIOS2IOHandler.cpp | 10 ++++------ src/IO/HDF5/HDF5IOHandler.cpp | 7 ++----- src/IO/HDF5/ParallelHDF5IOHandler.cpp | 15 ++++----------- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/src/IO/ADIOS/ADIOS2IOHandler.cpp b/src/IO/ADIOS/ADIOS2IOHandler.cpp index da00a72e3a..450de861f7 100644 --- a/src/IO/ADIOS/ADIOS2IOHandler.cpp +++ b/src/IO/ADIOS/ADIOS2IOHandler.cpp @@ -2106,13 +2106,12 @@ ADIOS2IOHandler::ADIOS2IOHandler( std::string path, Access at, MPI_Comm comm, - // NOLINTNEXTLINE(performance-unnecessary-value-param) - json::TracingJSON, + json::TracingJSON config, // NOLINTNEXTLINE(performance-unnecessary-value-param) std::string, // NOLINTNEXTLINE(performance-unnecessary-value-param) std::string) - : AbstractIOHandler(std::move(path), at, comm) + : AbstractIOHandler(std::move(path), at, std::move(config), comm) {} #endif // openPMD_HAVE_MPI @@ -2120,13 +2119,12 @@ ADIOS2IOHandler::ADIOS2IOHandler( ADIOS2IOHandler::ADIOS2IOHandler( std::string path, Access at, - // NOLINTNEXTLINE(performance-unnecessary-value-param) - json::TracingJSON, + json::TracingJSON config, // NOLINTNEXTLINE(performance-unnecessary-value-param) std::string, // NOLINTNEXTLINE(performance-unnecessary-value-param) std::string) - : AbstractIOHandler(std::move(path), at) + : AbstractIOHandler(std::move(path), at, std::move(config)) {} std::future ADIOS2IOHandler::flush(internal::ParsedFlushParams &) diff --git a/src/IO/HDF5/HDF5IOHandler.cpp b/src/IO/HDF5/HDF5IOHandler.cpp index 706f84bbab..19fe74df12 100644 --- a/src/IO/HDF5/HDF5IOHandler.cpp +++ b/src/IO/HDF5/HDF5IOHandler.cpp @@ -2953,11 +2953,8 @@ std::future HDF5IOHandler::flush(internal::ParsedFlushParams &) #else HDF5IOHandler::HDF5IOHandler( - std::string path, - Access at, - // NOLINTNEXTLINE(performance-unnecessary-value-param) - [[maybe_unused]] json::TracingJSON config) - : AbstractIOHandler(std::move(path), at) + std::string path, Access at, json::TracingJSON config) + : AbstractIOHandler(std::move(path), at, std::move(config)) { throw std::runtime_error("openPMD-api built without HDF5 support"); } diff --git a/src/IO/HDF5/ParallelHDF5IOHandler.cpp b/src/IO/HDF5/ParallelHDF5IOHandler.cpp index b89383b7ce..f8bb7ea78e 100644 --- a/src/IO/HDF5/ParallelHDF5IOHandler.cpp +++ b/src/IO/HDF5/ParallelHDF5IOHandler.cpp @@ -359,22 +359,15 @@ ParallelHDF5IOHandlerImpl::~ParallelHDF5IOHandlerImpl() #if openPMD_HAVE_MPI ParallelHDF5IOHandler::ParallelHDF5IOHandler( - std::string path, - Access at, - MPI_Comm comm, - // NOLINTNEXTLINE(performance-unnecessary-value-param) - [[maybe_unused]] json::TracingJSON config) - : AbstractIOHandler(std::move(path), at, comm) + std::string path, Access at, MPI_Comm comm, json::TracingJSON config) + : AbstractIOHandler(std::move(path), at, std::move(config), comm) { throw std::runtime_error("openPMD-api built without HDF5 support"); } #else ParallelHDF5IOHandler::ParallelHDF5IOHandler( - std::string const &path, - Access at, - // NOLINTNEXTLINE(performance-unnecessary-value-param) - [[maybe_unused]] json::TracingJSON config) - : AbstractIOHandler(path, at) + std::string const &path, Access at, json::TracingJSON config) + : AbstractIOHandler(path, at, std::move(config)) { throw std::runtime_error( "openPMD-api built without parallel support and without HDF5 support");