diff --git a/include/openPMD/backend/Attributable.hpp b/include/openPMD/backend/Attributable.hpp index 3a4249a718..cb92ac4402 100644 --- a/include/openPMD/backend/Attributable.hpp +++ b/include/openPMD/backend/Attributable.hpp @@ -314,6 +314,12 @@ class Attributable */ MyPath myPath() const; + /** + * @brief Sets the object dirty to make internal procedures think it has + * been modified. + */ + void touch(); + // clang-format off OPENPMD_protected // clang-format on diff --git a/src/backend/Attributable.cpp b/src/backend/Attributable.cpp index 83b00119d4..fb46d6106b 100644 --- a/src/backend/Attributable.cpp +++ b/src/backend/Attributable.cpp @@ -241,6 +241,11 @@ auto Attributable::myPath() const -> MyPath return res; } +void Attributable::touch() +{ + setDirtyRecursive(true); +} + void Attributable::seriesFlush( internal::FlushParams const &flushParams, bool flush_entire_series) { diff --git a/src/backend/Writable.cpp b/src/backend/Writable.cpp index 9308bd50ff..5a87297ae3 100644 --- a/src/backend/Writable.cpp +++ b/src/backend/Writable.cpp @@ -58,9 +58,7 @@ void Writable::seriesFlush( auto [iteration_internal, series_internal] = impl.containingIteration(); if (iteration_internal) { - (*iteration_internal) - ->asInternalCopyOf() - .setDirtyRecursive(true); + (*iteration_internal)->asInternalCopyOf().touch(); } auto series = series_internal->asInternalCopyOf(); auto [begin, end] = [&, &iteration_internal_lambda = iteration_internal]()