Skip to content

Commit 3e8f374

Browse files
committed
clang-tidy fixes
1 parent 7ac3661 commit 3e8f374

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/RecordComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ void RecordComponent::loadChunk_impl(
784784

785785
std::optional<T> val =
786786
switchNonVectorType<detail::do_convert</* To = */ T>>(
787-
/* from = */ getDatatype(), rc.m_constantValue);
787+
/* dt = */ getDatatype(), rc.m_constantValue);
788788

789789
if (val.has_value())
790790
{

src/auxiliary/Future.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,21 @@ auto DeferredComputation<T>::valid() const noexcept -> bool
4141

4242
template class DeferredComputation<void>;
4343
template class DeferredComputation<RecordComponent::shared_ptr_dataset_types>;
44-
// clang-format off
44+
45+
// need this for clang-tidy
46+
#define OPENPMD_ARRAY(type) type[]
47+
#define OPENPMD_APPLY_TEMPLATE(template_, type) template_<type>
48+
4549
#define INSTANTIATE_FUTURE(dtype) \
46-
/* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
47-
template class DeferredComputation<std::shared_ptr<dtype>>;
48-
#define INSTANTIATE_FUTURE_WITH_AND_WITHOUT_EXTENT(type) INSTANTIATE_FUTURE(type) INSTANTIATE_FUTURE(type[])
50+
template class DeferredComputation<OPENPMD_APPLY_TEMPLATE( \
51+
std::shared_ptr, dtype)>;
52+
#define INSTANTIATE_FUTURE_WITH_AND_WITHOUT_EXTENT(type) \
53+
INSTANTIATE_FUTURE(type) INSTANTIATE_FUTURE(OPENPMD_ARRAY(type))
4954
OPENPMD_FOREACH_NONVECTOR_DATATYPE(INSTANTIATE_FUTURE_WITH_AND_WITHOUT_EXTENT)
5055
#undef INSTANTIATE_FUTURE
5156
#undef INSTANTIATE_FUTURE_WITH_AND_WITHOUT_EXTENT
52-
// clang-format on
57+
#undef OPENPMD_ARRAY
58+
#undef OPENPMD_APPLY_TEMPLATE
5359
} // namespace openPMD::auxiliary
5460

5561
#include "openPMD/UndefDatatypeMacros.hpp"

0 commit comments

Comments
 (0)