diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolAuxContainerCnv.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolAuxContainerCnv.icc index b42868087bdec42c19ce0e919b55aedc3e1c725d..f96a4f82637b022036d64d10c73e495590db4e9c 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolAuxContainerCnv.icc +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolAuxContainerCnv.icc @@ -20,9 +20,9 @@ */ template <class AUXSTORE, class ... TPCNVS> T_AthenaPoolAuxContainerCnv<AUXSTORE, TPCNVS...>::T_AthenaPoolAuxContainerCnv( ISvcLocator* svcLoc ) - : Base( svcLoc ) + : Base( svcLoc ), + m_guid (AthenaPoolCnvSvc::guidFromTypeinfo (typeid (AUXSTORE))) { - m_guid = AthenaPoolCnvSvc::guidFromTypeinfo (typeid (AUXSTORE)); } diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.icc b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.icc index 6ba026c279706fe55c9b3ed8d0d547f7084a7608..ab54348c5510898285296333ca48875e00597edb 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.icc +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/AthenaPoolCnvSvc/T_AthenaPoolTPCnvCnv.icc @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -17,9 +17,9 @@ */ template <class TRANS, class TPCNV_CUR, class ... TPCNVS> T_AthenaPoolTPCnvCnv<TRANS, TPCNV_CUR, TPCNVS...>::T_AthenaPoolTPCnvCnv( ISvcLocator* svcLoc ) - : Base( svcLoc ) + : Base( svcLoc ), + m_guid (AthenaPoolCnvSvc::guidFromTypeinfo (typeid (Pers_t))) { - m_guid = AthenaPoolCnvSvc::guidFromTypeinfo (typeid (Pers_t)); } diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx index 643354ddd27f40fb52ed5b972b63035a4e3c39b0..b55f33ab19c5e6abfeeb003f6e5364d3e5f8d379 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/src/AuxDiscoverySvc.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /** @file AuxDiscoverySvc.cxx @@ -73,7 +73,7 @@ bool AuxDiscoverySvc::setData(SG::auxid_t auxid, void* data, const RootType& typ } else { // Move the data to the dynamic store. std::unique_ptr<SG::IAuxTypeVector> vec(registry.makeVectorFromData(auxid, data, false, true)); - m_storeInt->addVector(auxid, std::move(vec), false); data = nullptr; + m_storeInt->addVector(auxid, std::move(vec), false); } return true; } @@ -217,22 +217,22 @@ StatusCode AuxDiscoverySvc::sendStore(const IAthenaSerializeSvc* serSvc, return(StatusCode::FAILURE); } } - for (SG::auxid_set_t::const_iterator iter = auxIDs.begin(), last = auxIDs.end(); iter != last; iter++) { - const std::string& dataStr = this->getAttrName(*iter) + "\n" + this->getTypeName(*iter) + "\n" + this->getElemName(*iter); + for (SG::auxid_t auxid : auxIDs) { + const std::string& dataStr = this->getAttrName(auxid) + "\n" + this->getTypeName(auxid) + "\n" + this->getElemName(auxid); if (!ipcTool->putObject(dataStr.c_str(), dataStr.size() + 1, num).isSuccess()) { return(StatusCode::FAILURE); } - const std::type_info* tip = this->getType(*iter); + const std::type_info* tip = this->getType(auxid); if (tip == nullptr) { return(StatusCode::FAILURE); } RootType type(*tip); StatusCode sc = StatusCode::FAILURE; if (type.IsFundamental()) { - sc = ipcTool->putObject(this->getData(*iter), type.SizeOf(), num); + sc = ipcTool->putObject(this->getData(auxid), type.SizeOf(), num); } else { size_t nbytes = 0; - void* buffer = serSvc->serialize(this->getData(*iter), type, nbytes); + void* buffer = serSvc->serialize(this->getData(auxid), type, nbytes); sc = ipcTool->putObject(buffer, nbytes, num); delete [] static_cast<char*>(buffer); buffer = nullptr; } diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx index c82597113a1b805e9072796011beda6025b8959a..7d1c5c0e41523260502e9968c9a0b1f8f7789863 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolAuxContainerCnv_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /** @@ -61,7 +61,6 @@ public: std::abort(); } - std::string m_name; YAuxCont_v1* m_pers1; YAuxCont_v2* m_pers2; }; diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx index a75b13c22154cdf0f8bda9abeca35cef5fb22753..b34b662bdb51b21bd3b86d4d493c021c7dc5a9e6 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /** * @file AthenaPoolCnvSvc/test/T_AthenaPoolTPCnvCnv_test.cxx @@ -59,7 +59,6 @@ public: std::abort(); } - std::string m_name; XCont* m_pers0; XCont_p1* m_pers1; XCont_p2* m_pers2; diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx index ba57e7647d90f74693da766fff1838ab2adde096..f17cc26a676a3bc349b22ba57d2353353b3975a9 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /** * @file AthenaPoolCnvSvc/test/T_AthenaPoolViewVectorCnv_test.cxx @@ -113,7 +113,6 @@ public: } } - std::string m_name; ViewVector<DataVector<Y_v2> >* m_pers; YCont_v2_pers2* m_pers_old; }; diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx index ad32a48ed6950af9d0c971245eba06c6c0db8f65..c0757b9db73ca1e6a42d9201bce517a98587d466 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AthenaPoolxAODCnv_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration */ /** @@ -65,7 +65,6 @@ public: std::abort(); } - std::string m_name; DataVector<Y_v1>* m_pers1; DataVector<Y_v2>* m_pers2; }; diff --git a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AuxContainerCopyTPCnv_test.cxx b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AuxContainerCopyTPCnv_test.cxx index 069f05faf17d3cae66f1e4e75b4bb5791f3e6043..d78bd957f7e82731f79ddec017a3611aa800bb92 100644 --- a/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AuxContainerCopyTPCnv_test.cxx +++ b/Database/AthenaPOOL/AthenaPoolCnvSvc/test/T_AuxContainerCopyTPCnv_test.cxx @@ -1,5 +1,5 @@ /* - * Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration. + * Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration. */ /** * @file AthenaPoolCnvSvc/test/T_AuxContainerCopyTPCnv_test.cxx @@ -48,9 +48,9 @@ class OldData public: OldData(); OldData (const OldData&) = default; + // cppcheck-suppress operatorEqVarError OldData& operator= (const OldData&) { return *this; } - SG::auxid_t m_i1_auxid; SG::auxid_t m_i2_auxid; };