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 Oct 29, 2024
1 parent f6b421c commit 08e9af8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
4 changes: 2 additions & 2 deletions include/openPMD/snapshots/ContainerTraits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class AbstractSnapshotsContainer
virtual ~AbstractSnapshotsContainer() = 0;

virtual auto currentIteration() -> std::optional<value_type *>;
virtual auto
currentIteration() const -> std::optional<value_type const *> = 0;
virtual auto currentIteration() const
-> std::optional<value_type const *> = 0;

virtual auto begin() -> iterator = 0;
virtual auto begin() const -> const_iterator = 0;
Expand Down
8 changes: 4 additions & 4 deletions include/openPMD/snapshots/StatefulIterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ class StatefulIterator
* This returns the current value of `During_t::iteration_idx` if that
* exists.
*/
auto
currentIteration() const -> std::optional<Iteration::IterationIndex_t>;
auto currentIteration() const
-> std::optional<Iteration::IterationIndex_t>;
};

/*
Expand Down Expand Up @@ -391,8 +391,8 @@ class StatefulIterator
auto resetCurrentIterationToBegin(
size_t num_skipped_iterations,
std::vector<iteration_index_t> current_iterations) -> void;
auto
peekCurrentlyOpenIteration() const -> std::optional<value_type const *>;
auto peekCurrentlyOpenIteration() const
-> std::optional<value_type const *>;
auto peekCurrentlyOpenIteration() -> std::optional<value_type *>;

auto reparse_possibly_deleted_iteration(iteration_index_t) -> void;
Expand Down
5 changes: 2 additions & 3 deletions src/Iteration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,9 +718,8 @@ auto Iteration::beginStep(bool reread) -> BeginStepStatus
}

auto Iteration::beginStep(
std::optional<Iteration> thisObject,
Series &series,
bool reread) -> BeginStepStatus
std::optional<Iteration> thisObject, Series &series, bool reread)
-> BeginStepStatus
{
BeginStepStatus res;
using IE = IterationEncoding;
Expand Down
8 changes: 4 additions & 4 deletions src/Series.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3004,8 +3004,8 @@ ReadIterations Series::readIterations()
namespace
{
auto make_writing_stateful_iterator(
Series const &copied_series,
internal::SeriesData &series) -> std::function<StatefulIterator *()>
Series const &copied_series, internal::SeriesData &series)
-> std::function<StatefulIterator *()>
{
if (!series.m_sharedStatefulIterator)
{
Expand All @@ -3016,8 +3016,8 @@ namespace
return [ptr = series.m_sharedStatefulIterator.get()]() { return ptr; };
}
auto make_reading_stateful_iterator(
Series copied_series,
internal::SeriesData &series) -> std::function<StatefulIterator *()>
Series copied_series, internal::SeriesData &series)
-> std::function<StatefulIterator *()>
{
return [s = std::move(copied_series), &series]() mutable {
if (!series.m_sharedStatefulIterator)
Expand Down
2 changes: 1 addition & 1 deletion src/backend/Writable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
*/
#include "openPMD/backend/Writable.hpp"

#include "openPMD/backend/Attributable.hpp"
#include "openPMD/IO/AbstractIOHandler.hpp"
#include "openPMD/Series.hpp"
#include "openPMD/backend/Attributable.hpp"

#include <stdexcept>

Expand Down
8 changes: 4 additions & 4 deletions src/snapshots/StatefulIterator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ namespace detail
}

template <typename V>
[[nodiscard]] auto
CurrentStep::get_variant() const -> std::optional<V const *>
[[nodiscard]] auto CurrentStep::get_variant() const
-> std::optional<V const *>
{
auto res = std::get_if<V>(*this);
if (res)
Expand Down Expand Up @@ -298,8 +298,8 @@ namespace
} // namespace

auto StatefulIterator::resetCurrentIterationToBegin(
size_t num_skipped_iterations,
std::vector<iteration_index_t> indexes) -> void
size_t num_skipped_iterations, std::vector<iteration_index_t> indexes)
-> void
{
auto &data = get();
data.currentStep.map_during_t(
Expand Down

0 comments on commit 08e9af8

Please sign in to comment.