From 2b3d8e83e10560fd7ebd2d0e815ccf11f7a5d535 Mon Sep 17 00:00:00 2001 From: scott snyder <sss@karma> Date: Wed, 7 Oct 2020 13:19:11 -0400 Subject: [PATCH] RootCollection: Update for ICollectionMetadata::const_iterator change. ICollectionMetadata::const_iterator now takes a unique_ptr. --- Database/APR/RootCollection/src/RootCollectionMetadata.cpp | 6 +++--- Database/APR/RootCollection/src/RootCollectionMetadata.h | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Database/APR/RootCollection/src/RootCollectionMetadata.cpp b/Database/APR/RootCollection/src/RootCollectionMetadata.cpp index 016ec419de80..1da914ab43b3 100644 --- a/Database/APR/RootCollection/src/RootCollectionMetadata.cpp +++ b/Database/APR/RootCollection/src/RootCollectionMetadata.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #include "RootCollectionMetadata.h" @@ -232,7 +232,7 @@ namespace pool { if( !m_hasKeys ) readKeys(); return ICollectionMetadata::const_iterator( - new RootCollectionMetadataIterator( m_keyMap.begin(), this ) ); + std::make_unique<RootCollectionMetadataIterator>( m_keyMap.begin(), this ) ); } @@ -243,7 +243,7 @@ namespace pool { if( !m_hasKeys ) // check also here, in case End is evaluated before Begin readKeys(); return ICollectionMetadata::const_iterator( - new RootCollectionMetadataIterator( m_keyMap.end(), this ) ); + std::make_unique<RootCollectionMetadataIterator>( m_keyMap.end(), this ) ); } } // end namespace diff --git a/Database/APR/RootCollection/src/RootCollectionMetadata.h b/Database/APR/RootCollection/src/RootCollectionMetadata.h index 473524a4d3da..0a128659cdcd 100644 --- a/Database/APR/RootCollection/src/RootCollectionMetadata.h +++ b/Database/APR/RootCollection/src/RootCollectionMetadata.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration */ #ifndef RootCollectionMetadata_h @@ -55,6 +55,7 @@ namespace pool { class RootCollectionMetadataIterator : public ICollectionMetadata::ICollectionMetadataIterator { + public: friend class RootCollectionMetadata; RootCollectionMetadataIterator( const MetadataKeyMap_t::const_iterator& iter, -- GitLab