From 471602d2f93cd232a02590b9b715aa65fac56464 Mon Sep 17 00:00:00 2001 From: scott snyder <snyder@bnl.gov> Date: Wed, 19 Dec 2018 20:24:55 +0100 Subject: [PATCH] EventContainers: Revert gcc9 warning change. The const_iterator change is suspected of causing performance problems (ATLASRECTS-4808). Revert for now, pending further analysis. --- .../EventContainers/IdentifiableContainerMT.h | 11 +++++++++++ Event/EventContainers/test/IDC_Realistic_Test.cxx | 2 -- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h index 9457b295e7c..4417de46067 100644 --- a/Event/EventContainers/EventContainers/IdentifiableContainerMT.h +++ b/Event/EventContainers/EventContainers/IdentifiableContainerMT.h @@ -106,6 +106,17 @@ public: /// iterator constructor const_iterator() : m_sptr(), m_current(nullptr), m_idContainer(nullptr), m_end(false) { } + /// assignment operator + const_iterator& operator = ( const const_iterator & it ) { + if(this == &it) return *this;//Safeguard against self assignment + m_hashItr = it.m_hashItr; + m_sptr = it.m_sptr; + m_current = it.m_current; + m_idContainer = it.m_idContainer; + m_end = it.m_end; + return *this; + } + /// increment operator const_iterator& operator ++ () { if(m_end) return *this; diff --git a/Event/EventContainers/test/IDC_Realistic_Test.cxx b/Event/EventContainers/test/IDC_Realistic_Test.cxx index a8da38a9947..ec0bbe33967 100644 --- a/Event/EventContainers/test/IDC_Realistic_Test.cxx +++ b/Event/EventContainers/test/IDC_Realistic_Test.cxx @@ -208,8 +208,6 @@ public: PseudoView(int s, int r, EventContainers::IdentifiableCache<MyCollection>* inIDC, int i) : IDC(inIDC), RoIStart(s), RoIEnd(r), threads(i), c() {} - PseudoView (const PseudoView&) = default; - PseudoView& operator= (const PseudoView&) = default; virtual ~PseudoView() {} }; -- GitLab