Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 21, 2024
1 parent 436360e commit 3c6550b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
21 changes: 8 additions & 13 deletions src/ChunkInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,20 +740,16 @@ namespace host_info
Method methodFromStringDescription(
std::string const &descr, [[maybe_unused]] bool consider_mpi)
{
static std::map<std::string, Method> const map
{
static std::map<std::string, Method> const map{
{"posix_hostname", Method::POSIX_HOSTNAME},
#if openPMD_HAVE_MPI
{"hostname",
consider_mpi ? Method::MPI_PROCESSOR_NAME
: Method::POSIX_HOSTNAME},
{"hostname",
consider_mpi ? Method::MPI_PROCESSOR_NAME
: Method::POSIX_HOSTNAME},
#else
{"hostname", Method::POSIX_HOSTNAME},
{"hostname", Method::POSIX_HOSTNAME},
#endif
{
"mpi_processor_name", Method::MPI_PROCESSOR_NAME
}
};
{"mpi_processor_name", Method::MPI_PROCESSOR_NAME}};
return map.at(descr);
}

Expand All @@ -772,13 +768,12 @@ namespace host_info

std::string byMethod(Method method)
{
static std::map<Method, std::string (*)()> const map
{
static std::map<Method, std::string (*)()> const map{
#if openPMD_POSIX_AVAILABLE
{Method::POSIX_HOSTNAME, &posix_hostname},
#endif
#if openPMD_HAVE_MPI
{Method::MPI_PROCESSOR_NAME, &mpi_processor_name},
{Method::MPI_PROCESSOR_NAME, &mpi_processor_name},
#endif
};
try
Expand Down
4 changes: 2 additions & 2 deletions src/IO/AbstractIOHandlerImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ namespace
using self_or_invoked_t = typename self_or_invoked<T>::type;

template <typename DeferredString>
auto undefer_string(DeferredString &&str)
-> self_or_invoked_t<DeferredString &&>
auto
undefer_string(DeferredString &&str) -> self_or_invoked_t<DeferredString &&>
{
if constexpr (std::is_invocable_v<DeferredString &&>)
{
Expand Down
3 changes: 1 addition & 2 deletions test/ParallelIOTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2080,8 +2080,7 @@ void adios2_chunk_distribution()
"parameters":
{
"NumAggregators":)END"
<< "\"" << std::to_string(mpi_size) << "\""
<< R"END(
<< "\"" << std::to_string(mpi_size) << "\"" << R"END(
}
}
}
Expand Down

0 comments on commit 3c6550b

Please sign in to comment.