From 7e9933e875d00d3019d50c06e1eb7fd9afa05844 Mon Sep 17 00:00:00 2001 From: Thomas Madlener Date: Fri, 13 Sep 2024 10:15:02 +0200 Subject: [PATCH] Make lambda capture simpler --- include/podio/detail/RelationIOHelpers.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/podio/detail/RelationIOHelpers.h b/include/podio/detail/RelationIOHelpers.h index b0fe1b60d..1ef2ee0ca 100644 --- a/include/podio/detail/RelationIOHelpers.h +++ b/include/podio/detail/RelationIOHelpers.h @@ -49,8 +49,7 @@ void tryAddTo(T, std::vector& relElements, const podio::Collectio template void addInterfaceToMultiRelation(std::vector& relElements, const podio::CollectionBase* coll, const podio::ObjectID id) { - std::apply([&relElements, &coll, &id](auto... t) { (tryAddTo(t, relElements, coll, id), ...); }, - typename InterfaceType::interfaced_types{}); + std::apply([&](auto... t) { (tryAddTo(t, relElements, coll, id), ...); }, typename InterfaceType::interfaced_types{}); } /// Helper function for adding an object to the OneToManyRelations container @@ -132,8 +131,7 @@ void tryAssignTo(T, InterfaceType*& relation, const podio::CollectionBase* coll, template void addInterfaceToSingleRelation(InterfaceType*& relation, const podio::CollectionBase* coll, const podio::ObjectID id) { - std::apply([&relation, &coll, &id](auto... t) { (tryAssignTo(t, relation, coll, id), ...); }, - typename InterfaceType::interfaced_types{}); + std::apply([&](auto... t) { (tryAssignTo(t, relation, coll, id), ...); }, typename InterfaceType::interfaced_types{}); } /// Helper function for assigning the related object in a OneToOneRelation