From 123b180180f332f1577f83b886f1cfbd194257bf Mon Sep 17 00:00:00 2001 From: Patrick Scholer <patick.scholer@cern.ch> Date: Tue, 16 Jun 2020 17:25:31 +0200 Subject: [PATCH] MmRdoToPrepDataTool.cxx: move MMPrepData* to unique_ptr --- .../MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx index 883419b53f06..a76c160b9aa1 100644 --- a/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx +++ b/MuonSpectrometer/MuonCnv/MuonMM_CnvTools/src/MmRdoToPrepDataTool.cxx @@ -226,9 +226,9 @@ StatusCode Muon::MmRdoToPrepDataTool::processCollection( const MM_RawDataCollect if(!merge) { // storage will be handeled by Store Gate - MMPrepData *mpd = new MMPrepData(prdId, hash, localPos, rdoList, cov, detEl, calibStrip.time, calibStrip.charge, calibStrip.distDrift); + std::unique_ptr<MMPrepData> mpd = std::unique_ptr<MMPrepData>(new MMPrepData(prdId, hash, localPos, rdoList, cov, detEl, calibStrip.time, calibStrip.charge, calibStrip.distDrift)); mpd->setAuthor(Muon::MMPrepData::Author::RDOTOPRDConverter); - prdColl->push_back(mpd); + prdColl->push_back(std::move(mpd)); } else { MMPrepData mpd = MMPrepData(prdId, hash, localPos, rdoList, cov, detEl, calibStrip.time, calibStrip.charge, calibStrip.distDrift); // set the hash of the MMPrepData such that it contains the correct value in case it gets used in SimpleMMClusterBuilderTool::getClusters -- GitLab