Skip to content

Commit 3feb5c5

Browse files
[pre-commit.ci] pre-commit autoupdate (#1602)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/pre-commit/mirrors-clang-format: v17.0.6 → v18.1.2](pre-commit/mirrors-clang-format@v17.0.6...v18.1.2) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * More `clang-format-18` Scripts --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Axel Huebl <[email protected]>
1 parent e4ce81f commit 3feb5c5

File tree

7 files changed

+18
-23
lines changed

7 files changed

+18
-23
lines changed

.github/workflows/clang-format/clang-format.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
if (( $# > 0 )); then
44
# received arguments, format those files
5-
clang-format-13 -i "$@"
5+
clang-format-18 -i "$@"
66
else
77
# received no arguments, find files on our own
88
find include/ src/ test/ examples/ \
99
-regextype egrep \
1010
-type f -regex '.*\.(hpp|cpp|hpp\.in)$' \
11-
| xargs clang-format-13 -i
11+
| xargs clang-format-18 -i
1212
fi

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ repos:
6666
# clang-format v13
6767
# to run manually, use .github/workflows/clang-format/clang-format.sh
6868
- repo: https://github.com/pre-commit/mirrors-clang-format
69-
rev: v17.0.6
69+
rev: v18.1.2
7070
hooks:
7171
- id: clang-format
7272
# By default, the clang-format hook configures:

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ name: openPMD-api-dev
33
channels:
44
- conda-forge
55
dependencies:
6-
- clang-format-12=12.0.1
6+
- clang-format-18=18.1.2
77
- bash=5

include/openPMD/RecordComponent.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,8 @@ class RecordComponent : public BaseRecordComponent
479479
*/
480480
template <typename Visitor, typename... Args>
481481
auto visit(Args &&...args) -> decltype(Visitor::template call<char>(
482-
std::declval<RecordComponent &>(), std::forward<Args>(args)...));
482+
std::declval<RecordComponent &>(),
483+
std::forward<Args>(args)...));
483484

484485
static constexpr char const *const SCALAR = "\vScalar";
485486

include/openPMD/RecordComponent.tpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,9 @@ RecordComponent::loadChunk(std::shared_ptr<T> data, Offset o, Extent e)
135135
if (extent.size() != dim || offset.size() != dim)
136136
{
137137
std::ostringstream oss;
138-
oss << "Dimensionality of chunk ("
139-
<< "offset=" << offset.size() << "D, "
140-
<< "extent=" << extent.size() << "D) "
141-
<< "and record component (" << int(dim) << "D) "
142-
<< "do not match.";
138+
oss << "Dimensionality of chunk (" << "offset=" << offset.size()
139+
<< "D, " << "extent=" << extent.size() << "D) "
140+
<< "and record component (" << int(dim) << "D) " << "do not match.";
143141
throw std::runtime_error(oss.str());
144142
}
145143
Extent dse = getExtent();

src/RecordComponent.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -499,17 +499,17 @@ void RecordComponent::verifyChunk(
499499
{
500500
std::ostringstream oss;
501501
oss << "Joined array: Must specify an empty offset (given: "
502-
<< "offset=" << o.size() << "D, "
503-
<< "extent=" << e.size() << "D).";
502+
<< "offset=" << o.size() << "D, " << "extent=" << e.size()
503+
<< "D).";
504504
throw std::runtime_error(oss.str());
505505
}
506506
if (e.size() != dim)
507507
{
508508
std::ostringstream oss;
509509
oss << "Joined array: Dimensionalities of chunk extent and dataset "
510510
"extent must be equivalent (given: "
511-
<< "offset=" << o.size() << "D, "
512-
<< "extent=" << e.size() << "D).";
511+
<< "offset=" << o.size() << "D, " << "extent=" << e.size()
512+
<< "D).";
513513
throw std::runtime_error(oss.str());
514514
}
515515
for (size_t i = 0; i < dim; ++i)
@@ -529,11 +529,9 @@ void RecordComponent::verifyChunk(
529529
if (e.size() != dim || o.size() != dim)
530530
{
531531
std::ostringstream oss;
532-
oss << "Dimensionality of chunk ("
533-
<< "offset=" << o.size() << "D, "
534-
<< "extent=" << e.size() << "D) "
535-
<< "and record component (" << int(dim) << "D) "
536-
<< "do not match.";
532+
oss << "Dimensionality of chunk (" << "offset=" << o.size() << "D, "
533+
<< "extent=" << e.size() << "D) " << "and record component ("
534+
<< int(dim) << "D) " << "do not match.";
537535
throw std::runtime_error(oss.str());
538536
}
539537
for (uint8_t i = 0; i < dim; ++i)

test/ParallelIOTest.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,8 +414,7 @@ void available_chunks_test(std::string const &file_ending)
414414
"parameters":
415415
{
416416
"NumAggregators":)END"
417-
<< "\"" << std::to_string(mpi_size) << "\""
418-
<< R"END(
417+
<< "\"" << std::to_string(mpi_size) << "\"" << R"END(
419418
}
420419
}
421420
}
@@ -957,8 +956,7 @@ void hipace_like_write(std::string const &file_ending)
957956
int const step = first_rank_step - my_first_step;
958957

959958
if (verbose)
960-
std::cout << "[" << i_mpi_rank << "] "
961-
<< "step: " << step
959+
std::cout << "[" << i_mpi_rank << "] " << "step: " << step
962960
<< " | first_ranks_step: " << first_rank_step
963961
<< std::endl;
964962
// do we start writing to a new step?

0 commit comments

Comments
 (0)