From a919d1fbbb08cd0baeb667eaed67fb2373bbf134 Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Wed, 7 Feb 2024 08:54:50 +0100 Subject: [PATCH] DPL Analysis: avoid extra cursorHelper methods --- .../Core/include/Framework/TableBuilder.h | 23 +++++-------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/Framework/Core/include/Framework/TableBuilder.h b/Framework/Core/include/Framework/TableBuilder.h index 2b19b43785d70..7de45f58d2e62 100644 --- a/Framework/Core/include/Framework/TableBuilder.h +++ b/Framework/Core/include/Framework/TableBuilder.h @@ -795,13 +795,17 @@ class TableBuilder template auto cursor() { - return cursorHelper(typename T::table_t::persistent_columns_t{}); + return [this](pack) { + return this->template persist({Cs::columnLabel()...}); + }(typename T::table_t::persistent_columns_t{}); } template auto cursor() { - return cursorHelper2(typename T::table_t::persistent_columns_t{}); + return [this](pack) { + return this->template persist({Cs::columnLabel()...}); + }(typename T::table_t::persistent_columns_t{}); } template @@ -861,21 +865,6 @@ class TableBuilder std::shared_ptr finalize(); private: - /// Helper which actually creates the insertion cursor. Notice that the - /// template argument T is a o2::soa::Table which contains only the - /// persistent columns. - template - auto cursorHelper(framework::pack) - { - return this->template persist({Cs::columnLabel()...}); - } - - template - auto cursorHelper2(framework::pack) - { - return this->template persist({Cs::columnLabel()...}); - } - bool (*mFinalizer)(std::vector>& arrays, void* holders); void (*mDestructor)(void* holders); void* mHolders;