From 0209c4bbeea91bbc04817c39afccbd99351a4c99 Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Wed, 27 Mar 2019 12:10:51 +0000 Subject: [PATCH] Navigation: Fix gcc9 warnings. --- Control/Navigation/Navigation/AthenaBarCodeImpl.h | 5 ++--- Control/Navigation/Navigation/INavigable.h | 6 +++--- Control/Navigation/Navigation/Navigable.h | 4 ++-- Control/Navigation/Navigation/Navigable.icc | 9 +-------- Control/Navigation/Navigation/NavigableTerminalNode.h | 4 ++-- Control/Navigation/Navigation/NavigableVector.h | 7 ++----- Control/Navigation/Navigation/NavigableVectorIterator.h | 4 ++-- Control/Navigation/Navigation/NavigationDefaults.h | 3 +-- Control/Navigation/Navigation/NavigationToken.h | 3 +-- Control/Navigation/src/INavigable.cxx | 8 +------- 10 files changed, 17 insertions(+), 36 deletions(-) diff --git a/Control/Navigation/Navigation/AthenaBarCodeImpl.h b/Control/Navigation/Navigation/AthenaBarCodeImpl.h index 4f7919f88fe..8add2c0910e 100644 --- a/Control/Navigation/Navigation/AthenaBarCodeImpl.h +++ b/Control/Navigation/Navigation/AthenaBarCodeImpl.h @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - 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 ATHENABARCODEIMPL_H @@ -53,8 +53,7 @@ public: public: //Constructors - virtual ~AthenaBarCodeImpl() { - } + virtual ~AthenaBarCodeImpl() = default; AthenaBarCodeImpl(); diff --git a/Control/Navigation/Navigation/INavigable.h b/Control/Navigation/Navigation/INavigable.h index 20d3580e46f..20291b5bcfd 100644 --- a/Control/Navigation/Navigation/INavigable.h +++ b/Control/Navigation/Navigation/INavigable.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 INAVIGABLE_H @@ -19,8 +19,8 @@ class INavigationToken; class INavigable { public: - - virtual ~INavigable(); + + virtual ~INavigable() = default; // enforce fillToken(,) method in derived classes! virtual void fillToken( INavigationToken & thisToken ) const = 0; diff --git a/Control/Navigation/Navigation/Navigable.h b/Control/Navigation/Navigation/Navigable.h index 9c5152f5285..20ccf36b70e 100644 --- a/Control/Navigation/Navigation/Navigable.h +++ b/Control/Navigation/Navigation/Navigable.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 NAVIGATION_NAVIGABLE_H @@ -165,7 +165,7 @@ class Navigable : virtual public INavigable Navigable(); - virtual ~Navigable(); + virtual ~Navigable() = default; //////////////////////////////////////////////////////////////////// // NavigationToken handling (INavigable interface implementation) // diff --git a/Control/Navigation/Navigation/Navigable.icc b/Control/Navigation/Navigation/Navigable.icc index 1eae2fd963b..2ebbdda8120 100644 --- a/Control/Navigation/Navigation/Navigable.icc +++ b/Control/Navigation/Navigation/Navigable.icc @@ -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 */ ////////////////////////////////////////////////////////////////////////////// @@ -14,13 +14,6 @@ template <typename CONT, typename RPAR, typename COLL> Navigable<CONT,RPAR,COLL>::Navigable() { } -// destructor -template <typename CONT, typename RPAR, typename COLL> -Navigable<CONT,RPAR,COLL>::~Navigable() -{ - m_constituents.clear(); -} - ////////////////////////////////////////////// // Navigation query handling w/o parameters // ////////////////////////////////////////////// diff --git a/Control/Navigation/Navigation/NavigableTerminalNode.h b/Control/Navigation/Navigation/NavigableTerminalNode.h index 18fcbf02421..8609fc4f676 100644 --- a/Control/Navigation/Navigation/NavigableTerminalNode.h +++ b/Control/Navigation/Navigation/NavigableTerminalNode.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 NAVIGATION_NAVIGABLETERMINALNODE_H @@ -25,7 +25,7 @@ class NavigableTerminalNode : virtual public INavigable // typedef NavigationDefaults::DefaultType constituent_const_iter; NavigableTerminalNode() { }; - virtual ~NavigableTerminalNode() { }; + virtual ~NavigableTerminalNode() = default; // implement INavigable::fillToken(...) as "do-nothing" virtual void fillToken( INavigationToken & ) const { }; diff --git a/Control/Navigation/Navigation/NavigableVector.h b/Control/Navigation/Navigation/NavigableVector.h index 094c8d71231..df8afe55fb6 100644 --- a/Control/Navigation/Navigation/NavigableVector.h +++ b/Control/Navigation/Navigation/NavigableVector.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 NAVIGATION_NAVIGABLEVECTOR_H @@ -36,10 +36,7 @@ public: NavigableVector() { } - virtual ~NavigableVector() - { - m_store.clear(); - }; + virtual ~NavigableVector() = default; // add elements void addElement(const CONT* aContainer, const OBJCT* anObject) diff --git a/Control/Navigation/Navigation/NavigableVectorIterator.h b/Control/Navigation/Navigation/NavigableVectorIterator.h index 01fdb10a264..0047035e150 100644 --- a/Control/Navigation/Navigation/NavigableVectorIterator.h +++ b/Control/Navigation/Navigation/NavigableVectorIterator.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 NAVIGATION_NAVIGABLEVECTORITERATOR_H @@ -43,7 +43,7 @@ class NavigableVectorIterator { } // destructor - virtual ~NavigableVectorIterator(){}; + virtual ~NavigableVectorIterator() = default; ///////////////////////// // Iterator Operations // diff --git a/Control/Navigation/Navigation/NavigationDefaults.h b/Control/Navigation/Navigation/NavigationDefaults.h index 9bbf5280d7c..227df7db8c7 100644 --- a/Control/Navigation/Navigation/NavigationDefaults.h +++ b/Control/Navigation/Navigation/NavigationDefaults.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 NAVIGATION_NAVIGATIONDEFAULTS_H @@ -52,7 +52,6 @@ namespace NavigationDefaults struct DefaultWeight { public: DefaultWeight() {} - DefaultWeight& operator=(const DefaultWeight&) {return *this;} const DefaultWeight& operator+(const DefaultWeight&) const {return *this;} const DefaultWeight& operator*(const DefaultWeight&) const {return *this;} bool operator==(DefaultWeight&) const {return true;} diff --git a/Control/Navigation/Navigation/NavigationToken.h b/Control/Navigation/Navigation/NavigationToken.h index 4891c1e6947..74c2f6c64f7 100644 --- a/Control/Navigation/Navigation/NavigationToken.h +++ b/Control/Navigation/Navigation/NavigationToken.h @@ -1,7 +1,7 @@ // This file's extension implies that it's C, but it's really -*- C++ -*-. /* - 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 NAVIGATIONTOKEN_H @@ -78,7 +78,6 @@ class NavigationToken : public INavigationToken NavigationTokenIterator(const tokenStore& aStore) : m_store(&aStore) , m_actual(aStore.begin()) { }; - virtual ~NavigationTokenIterator() { }; NavigationTokenIterator begin() { diff --git a/Control/Navigation/src/INavigable.cxx b/Control/Navigation/src/INavigable.cxx index 7885747c005..4a6294fb3ae 100644 --- a/Control/Navigation/src/INavigable.cxx +++ b/Control/Navigation/src/INavigable.cxx @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // INavigable.cxx @@ -19,9 +19,3 @@ // Constructors //////////////// -// Destructor -/////////////// - -INavigable::~INavigable() -{} - -- GitLab