From 22811fdafe52922c08d0413dd6a4f25cdfbe20b4 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Sat, 29 Jan 2022 13:15:16 +0100 Subject: [PATCH] [wip] clang-tidy fixes --- include/podio/Association.h | 2 +- include/podio/AssociationSIOBlock.h | 2 +- tests/associations.cpp | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/podio/Association.h b/include/podio/Association.h index dd147b0e2..385d743b2 100644 --- a/include/podio/Association.h +++ b/include/podio/Association.h @@ -77,7 +77,7 @@ class AssociationT { /// Destructor ~AssociationT() { if (m_obj) { - m_obj->release(); + m_obj->release(); // NOLINT(clang-analyzer-cplusplus.NewDelete) issue #174 } } diff --git a/include/podio/AssociationSIOBlock.h b/include/podio/AssociationSIOBlock.h index 00683b803..80a0c17be 100644 --- a/include/podio/AssociationSIOBlock.h +++ b/include/podio/AssociationSIOBlock.h @@ -75,4 +75,4 @@ class AssociationSIOBlock : public podio::SIOBlock { } // namespace podio -#endif // PODIO_ASSOCIATIONBLOCK_H +#endif // PODIO_ASSOCIATIONSIOBLOCK_H diff --git a/tests/associations.cpp b/tests/associations.cpp index 23c5a6876..06b4b08e9 100644 --- a/tests/associations.cpp +++ b/tests/associations.cpp @@ -27,7 +27,8 @@ TEST_CASE("Association basics", "[associations]") { auto cluster = MutableExampleCluster(); auto hit = MutableExampleHit(); - auto mutAssoc = TestMutA(); + auto mutAssoc = TestMutA(); // NOLINT(clang-analyzer-cplusplus.NewDelete) necessary due to clang-tidy and Catch2 + // SECTIONs interaction (common setup seems to confuse clang-tidy) mutAssoc.setWeight(3.14f); mutAssoc.setFrom(hit); mutAssoc.setTo(cluster);