Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/clang-format/clang-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

if (( $# > 0 )); then
# received arguments, format those files
clang-format-18 -i "$@"
clang-format-20 -i "$@"
else
# received no arguments, find files on our own
find include/ src/ test/ examples/ \
-regextype egrep \
-type f -regex '.*\.(hpp|cpp|hpp\.in)$' \
| xargs clang-format-18 -i
| xargs clang-format-20 -i
fi
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ repos:
# clang-format v13
# to run manually, use .github/workflows/clang-format/clang-format.sh
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.7
rev: v20.1.0
hooks:
- id: clang-format
# By default, the clang-format hook configures:
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ name: openPMD-api-dev
channels:
- conda-forge
dependencies:
- clang-format-18=18.1.2
- clang-format-20=20.1.0
- bash=5
5 changes: 3 additions & 2 deletions examples/7_extended_write_serial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ int main()
f.setComment("This is fine and actually encouraged by the standard");
f.setAttribute(
"custom_attribute_name",
std::string("This attribute is manually added and can contain "
"about any datatype you would want"));
std::string(
"This attribute is manually added and can contain "
"about any datatype you would want"));
// note that removing attributes required by the standard typically
// makes the file unusable for post-processing
f.deleteAttribute("custom_attribute_name");
Expand Down
108 changes: 54 additions & 54 deletions include/openPMD/IO/IOTask.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ struct OPENPMDAPI_EXPORT Parameter : public AbstractParameter
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::CREATE_FILE>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::CREATE_FILE> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -170,8 +170,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::CREATE_FILE>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::CHECK_FILE>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::CHECK_FILE> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -197,8 +197,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::CHECK_FILE>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::OPEN_FILE>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::OPEN_FILE> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand Down Expand Up @@ -233,8 +233,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::OPEN_FILE>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::CLOSE_FILE>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::CLOSE_FILE> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -250,8 +250,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::CLOSE_FILE>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::DELETE_FILE>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::DELETE_FILE> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -269,8 +269,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::DELETE_FILE>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::CREATE_PATH>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::CREATE_PATH> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -288,8 +288,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::CREATE_PATH>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::CLOSE_PATH>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::CLOSE_PATH> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -305,8 +305,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::CLOSE_PATH>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::OPEN_PATH>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::OPEN_PATH> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -324,8 +324,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::OPEN_PATH>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::DELETE_PATH>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::DELETE_PATH> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -343,8 +343,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::DELETE_PATH>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::LIST_PATHS>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::LIST_PATHS> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -363,8 +363,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::LIST_PATHS>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::CREATE_DATASET>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::CREATE_DATASET> : public AbstractParameter
{
Parameter(Dataset const &ds)
: extent(ds.extent)
Expand Down Expand Up @@ -402,8 +402,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::CREATE_DATASET>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::EXTEND_DATASET>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::EXTEND_DATASET> : public AbstractParameter
{
Parameter(Extent e) : joinedDimension(Dataset::joinedDimension(e))
{
Expand All @@ -430,8 +430,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::EXTEND_DATASET>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::OPEN_DATASET>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::OPEN_DATASET> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -457,8 +457,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::OPEN_DATASET>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::DELETE_DATASET>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::DELETE_DATASET> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -476,8 +476,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::DELETE_DATASET>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::WRITE_DATASET>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::WRITE_DATASET> : public AbstractParameter
{
Parameter() = default;

Expand All @@ -499,8 +499,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::WRITE_DATASET>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::READ_DATASET>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::READ_DATASET> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -521,8 +521,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::READ_DATASET>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::LIST_DATASETS>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::LIST_DATASETS> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -541,8 +541,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::LIST_DATASETS>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::GET_BUFFER_VIEW>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::GET_BUFFER_VIEW> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand Down Expand Up @@ -572,8 +572,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::GET_BUFFER_VIEW>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::DELETE_ATT>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::DELETE_ATT> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -591,8 +591,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::DELETE_ATT>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::WRITE_ATT>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::WRITE_ATT> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand Down Expand Up @@ -625,8 +625,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::WRITE_ATT>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::READ_ATT>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::READ_ATT> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -647,8 +647,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::READ_ATT>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::READ_ATT_ALLSTEPS>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::READ_ATT_ALLSTEPS> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand Down Expand Up @@ -679,8 +679,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::READ_ATT_ALLSTEPS>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::LIST_ATTS>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::LIST_ATTS> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -699,8 +699,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::LIST_ATTS>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::ADVANCE>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::ADVANCE> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand Down Expand Up @@ -736,8 +736,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::ADVANCE>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::AVAILABLE_CHUNKS>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::AVAILABLE_CHUNKS> : public AbstractParameter
{
Parameter() = default;
Parameter(Parameter &&) = default;
Expand All @@ -756,8 +756,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::AVAILABLE_CHUNKS>
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::DEREGISTER>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::DEREGISTER> : public AbstractParameter
{
Parameter(void const *ptr_in) : former_parent(ptr_in)
{}
Expand Down Expand Up @@ -796,8 +796,8 @@ struct OPENPMDAPI_EXPORT Parameter<Operation::TOUCH> : public AbstractParameter
};

template <>
struct OPENPMDAPI_EXPORT Parameter<Operation::SET_WRITTEN>
: public AbstractParameter
struct OPENPMDAPI_EXPORT
Parameter<Operation::SET_WRITTEN> : public AbstractParameter
{
explicit Parameter() = default;

Expand Down
11 changes: 6 additions & 5 deletions include/openPMD/backend/Attribute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ namespace detail
}
else
{
return {
std::runtime_error("getCast: cast from string to char only "
"possible if string has length 1.")};
return {std::runtime_error(
"getCast: cast from string to char only "
"possible if string has length 1.")};
}
}
else if constexpr (
Expand Down Expand Up @@ -286,8 +286,9 @@ namespace detail
{
auto exception = std::get<std::runtime_error>(conv);
return {std::runtime_error(
std::string("getCast: no scalar to vector conversion "
"possible, recursive error: ") +
std::string(
"getCast: no scalar to vector conversion "
"possible, recursive error: ") +
exception.what())};
}
}
Expand Down
Loading
Loading