Skip to content
Snippets Groups Projects
Commit 3c0288d7 authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'cppcheck.AthContainers-20200619' into 'master'

AthContainers+xAODCore: Fix cppcheck warnings.

See merge request atlas/athena!33941
parents 3c479025 7a0d740e
No related branches found
No related tags found
No related merge requests found
/* /*
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
// $Id$
/** /**
* @file AthContainers/tools/ElementProxy.icc * @file AthContainers/tools/ElementProxy.icc
* @author scott snyder <snyder@bnl.gov> * @author scott snyder <snyder@bnl.gov>
...@@ -46,9 +44,11 @@ ElementProxy<DVL>::ElementProxy (typename DVL::BaseContainer::iterator i, ...@@ -46,9 +44,11 @@ ElementProxy<DVL>::ElementProxy (typename DVL::BaseContainer::iterator i,
* @c DataVector/List's, both of which own their elements. * @c DataVector/List's, both of which own their elements.
*/ */
template <class DVL> template <class DVL>
// cppcheck-suppress operatorEqVarError
ElementProxy<DVL>& ElementProxy<DVL>::operator= (const ElementProxy& rhs) ElementProxy<DVL>& ElementProxy<DVL>::operator= (const ElementProxy& rhs)
{ {
if (*rhs.m_proxied != *m_proxied) { if (*rhs.m_proxied != *m_proxied) {
// cppcheck-suppress assertWithSideEffect
ATHCONTAINERS_ASSERT (! (container()->ownPolicy() == SG::OWN_ELEMENTS && ATHCONTAINERS_ASSERT (! (container()->ownPolicy() == SG::OWN_ELEMENTS &&
rhs.container()->ownPolicy() == SG::OWN_ELEMENTS)); rhs.container()->ownPolicy() == SG::OWN_ELEMENTS));
container()->assignBaseElement (m_proxied, *rhs.m_proxied); container()->assignBaseElement (m_proxied, *rhs.m_proxied);
......
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
/** /**
* @file AthContainers/test/supportsThinning_test.cxx * @file AthContainers/test/supportsThinning_test.cxx
...@@ -21,6 +21,7 @@ struct A {}; ...@@ -21,6 +21,7 @@ struct A {};
struct B : public DataVector<int> {}; struct B : public DataVector<int> {};
struct B0 : public DataVector<int> { static bool constexpr supportsThinning = false; }; struct B0 : public DataVector<int> { static bool constexpr supportsThinning = false; };
struct C : public SG::AuxElement {}; struct C : public SG::AuxElement {};
// cppcheck-suppress duplInheritedMember
struct C0 : public SG::AuxElement { static bool constexpr supportsThinning = false; }; struct C0 : public SG::AuxElement { static bool constexpr supportsThinning = false; };
struct D : public SG::AuxStoreInternal {}; struct D : public SG::AuxStoreInternal {};
struct D0 : public SG::AuxStoreInternal { static bool constexpr supportsThinning = false; }; struct D0 : public SG::AuxStoreInternal { static bool constexpr supportsThinning = false; };
......
...@@ -57,6 +57,7 @@ namespace xAOD { ...@@ -57,6 +57,7 @@ namespace xAOD {
// Unfortunately the dynamic variables can not be copied this easily... // Unfortunately the dynamic variables can not be copied this easily...
if( parent.m_store ) { if( parent.m_store ) {
// cppcheck-suppress copyCtorPointerCopying
m_store = parent.m_store; m_store = parent.m_store;
m_ownsStore = false; m_ownsStore = false;
m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store ); m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
......
/* /*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/ */
// $Id: AuxInfoBase.cxx 793737 2017-01-24 20:11:10Z ssnyder $ // $Id: AuxInfoBase.cxx 793737 2017-01-24 20:11:10Z ssnyder $
...@@ -55,6 +55,7 @@ namespace xAOD { ...@@ -55,6 +55,7 @@ namespace xAOD {
// Unfortunately the dynamic variables can not be copied this easily... // Unfortunately the dynamic variables can not be copied this easily...
if( parent.m_store ) { if( parent.m_store ) {
// cppcheck-suppress copyCtorPointerCopying
m_store = parent.m_store; m_store = parent.m_store;
m_ownsStore = false; m_ownsStore = false;
m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store ); m_storeIO = dynamic_cast< SG::IAuxStoreIO* >( m_store );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment