From 9f08a4f3c0406222473a1048e3135bbeee2eb868 Mon Sep 17 00:00:00 2001 From: abarton <Adam.Edward.Barton@cern.ch> Date: Tue, 5 Nov 2024 14:12:25 +0000 Subject: [PATCH] Avoid generating extra shared_ptr --- .../TrigT1MuctpiPhase1/src/TrigThresholdDecisionTool.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/TrigThresholdDecisionTool.cxx b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/TrigThresholdDecisionTool.cxx index 61b60aa1eec0..62caa985d55c 100644 --- a/Trigger/TrigT1/TrigT1MuctpiPhase1/src/TrigThresholdDecisionTool.cxx +++ b/Trigger/TrigT1/TrigT1MuctpiPhase1/src/TrigThresholdDecisionTool.cxx @@ -45,7 +45,7 @@ namespace LVL1 ATH_CHECK(menuThresholds.has_value()); for (const std::shared_ptr<TrigConf::L1Threshold>& thrBase : menuThresholds.value().get()) { - std::shared_ptr<TrigConf::L1Threshold_MU> thr = std::static_pointer_cast<TrigConf::L1Threshold_MU>(thrBase); + auto thr = static_cast<TrigConf::L1Threshold_MU*>(thrBase.get()); //parse the tgc flags and buffer them std::string tgcFlags = getShapedFlags( thr->tgcFlags() ); @@ -124,7 +124,7 @@ namespace LVL1 //loop over the thresholds for (const std::shared_ptr<TrigConf::L1Threshold>& thrBase : menuThresholds) { - std::shared_ptr<TrigConf::L1Threshold_MU> thr = std::static_pointer_cast<TrigConf::L1Threshold_MU>(thrBase); + auto thr = static_cast<TrigConf::L1Threshold_MU*>(thrBase.get()); bool passed{false}; if (system == LVL1::ITrigT1MuonRecRoiTool::Barrel) { -- GitLab