From 49223b96b84594ad7ccae2e2e419640d6cda2d0d Mon Sep 17 00:00:00 2001 From: scott snyder <scott.snyder@cern.ch> Date: Tue, 16 Apr 2019 03:14:17 +0200 Subject: [PATCH] TrkParticleBase: Fix gcc9 warnings. In C++11, implicit declarations of copy and assignment are deprecated if the class has a user defined destructor or copy or assignment. gcc9 now warns about this by default. Adjust to avoid the warning. --- .../TrkParticleBase/LinkToTrackParticleBase.h | 7 ++----- .../src/LinkToTrackParticleBase.cxx | 14 +------------- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/Tracking/TrkEvent/TrkParticleBase/TrkParticleBase/LinkToTrackParticleBase.h b/Tracking/TrkEvent/TrkParticleBase/TrkParticleBase/LinkToTrackParticleBase.h index fc8a6e730e1..402d7b09630 100644 --- a/Tracking/TrkEvent/TrkParticleBase/TrkParticleBase/LinkToTrackParticleBase.h +++ b/Tracking/TrkEvent/TrkParticleBase/TrkParticleBase/LinkToTrackParticleBase.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef TRKPARTICLEBASE_LINKTOTRACKPARTICLEBASE_H @@ -24,7 +24,7 @@ namespace Trk LinkToTrackParticleBase( ElementLink<TrackParticleBaseCollection>& link); /** default destructor */ - virtual ~LinkToTrackParticleBase(); + virtual ~LinkToTrackParticleBase() = default; /** return the track parameters of the track (to which the EL< TrackParticleBaseCollection > points) */ const TrackParameters * parameters() const; @@ -35,9 +35,6 @@ namespace Trk /** method to clone the LinkToTrack object */ LinkToTrackParticleBase * clone() const ; - /** assignment operator */ - LinkToTrackParticleBase& operator= ( const LinkToTrackParticleBase& rhs ); - };//end of class definitions }//end of namespace definitions diff --git a/Tracking/TrkEvent/TrkParticleBase/src/LinkToTrackParticleBase.cxx b/Tracking/TrkEvent/TrkParticleBase/src/LinkToTrackParticleBase.cxx index ebd91f4426a..d99beb0edff 100644 --- a/Tracking/TrkEvent/TrkParticleBase/src/LinkToTrackParticleBase.cxx +++ b/Tracking/TrkEvent/TrkParticleBase/src/LinkToTrackParticleBase.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ @@ -16,9 +16,6 @@ namespace Trk : ElementLink<TrackParticleBaseCollection> ( link ) {} - LinkToTrackParticleBase::~LinkToTrackParticleBase() - {} - const TrackParameters * LinkToTrackParticleBase::parameters() const { if ( isValid() ) @@ -35,13 +32,4 @@ namespace Trk return new LinkToTrackParticleBase ( *this ); } - Trk::LinkToTrackParticleBase& Trk::LinkToTrackParticleBase::operator= ( const Trk::LinkToTrackParticleBase& rhs ) - { - if ( this!=&rhs ) - { - ElementLink<TrackParticleBaseCollection>::operator= ( rhs ); - } - return *this; - } - }//end of namespace definitions -- GitLab