clang-tidy: override
authorRoland Schulz <roland.schulz@intel.com>
Wed, 18 Jul 2018 09:52:51 +0000 (02:52 -0700)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 7 Sep 2018 10:58:50 +0000 (12:58 +0200)
Change-Id: I3767d2a1117b525d9284a32935a4e8bb3ab337af

118 files changed:
src/.clang-tidy
src/.clang-tidy.new.code
src/gromacs/analysisdata/analysisdata.h
src/gromacs/analysisdata/arraydata.h
src/gromacs/analysisdata/datamodule.h
src/gromacs/analysisdata/dataproxy.h
src/gromacs/analysisdata/modules/average.h
src/gromacs/analysisdata/modules/displacement.h
src/gromacs/analysisdata/modules/histogram.cpp
src/gromacs/analysisdata/modules/histogram.h
src/gromacs/analysisdata/modules/lifetime.cpp
src/gromacs/analysisdata/modules/lifetime.h
src/gromacs/analysisdata/modules/plot.h
src/gromacs/analysisdata/tests/analysisdata.cpp
src/gromacs/analysisdata/tests/mock_datamodule.h
src/gromacs/commandline/cmdlinehelpmodule.cpp
src/gromacs/commandline/cmdlinehelpmodule.h
src/gromacs/commandline/cmdlinehelpwriter.cpp
src/gromacs/commandline/cmdlinemodulemanager.cpp
src/gromacs/commandline/cmdlineoptionsmodule.cpp
src/gromacs/commandline/cmdlineprogramcontext.cpp
src/gromacs/commandline/cmdlineprogramcontext.h
src/gromacs/commandline/shellcompletions.cpp
src/gromacs/commandline/tests/cmdlinemodulemanagertest.h
src/gromacs/commandline/tests/cmdlineprogramcontext.cpp
src/gromacs/commandline/tests/pargs.cpp
src/gromacs/ewald/tests/testhardwarecontexts.h
src/gromacs/fft/tests/fft.cpp
src/gromacs/fileio/gmxfio-xdr.h
src/gromacs/fileio/tests/confio.cpp
src/gromacs/fileio/timecontrol.cpp
src/gromacs/gmxana/pp2shift.cpp
src/gromacs/gmxpreprocess/insert-molecules.cpp
src/gromacs/gmxpreprocess/readir.cpp
src/gromacs/gmxpreprocess/tests/readir.cpp
src/gromacs/gpu_utils/tests/gputest.h
src/gromacs/mdlib/tests/shake.cpp
src/gromacs/mdrunutility/mdmodules.cpp
src/gromacs/mdrunutility/tests/threadaffinitytest.h
src/gromacs/mdrunutility/threadaffinity.cpp
src/gromacs/onlinehelp/helptopic.h
src/gromacs/onlinehelp/helpwritercontext.cpp
src/gromacs/onlinehelp/tests/mock_helptopic.h
src/gromacs/options/abstractsection.h
src/gromacs/options/basicoptions.h
src/gromacs/options/basicoptionstorage.h
src/gromacs/options/filenameoption.h
src/gromacs/options/filenameoptionmanager.h
src/gromacs/options/filenameoptionstorage.h
src/gromacs/options/ioptionscontainerwithsections.h
src/gromacs/options/options-impl.h
src/gromacs/options/options.h
src/gromacs/options/optionsection.cpp
src/gromacs/options/optionsection.h
src/gromacs/options/optionstoragetemplate.h
src/gromacs/options/optionsvisitor.h
src/gromacs/options/repeatingsection.h
src/gromacs/options/tests/abstractoptionstorage.cpp
src/gromacs/options/timeunitmanager.cpp
src/gromacs/options/timeunitmanager.h
src/gromacs/options/treesupport.cpp
src/gromacs/options/valuestore.h
src/gromacs/selection/selectionfileoption.h
src/gromacs/selection/selectionfileoptionstorage.h
src/gromacs/selection/selectionoption.h
src/gromacs/selection/selectionoptionbehavior.h
src/gromacs/selection/selectionoptionmanager.h
src/gromacs/selection/selectionoptionstorage.h
src/gromacs/selection/selhelp.cpp
src/gromacs/selection/tests/indexutil.cpp
src/gromacs/selection/tests/poscalc.cpp
src/gromacs/selection/tests/selectioncollection.cpp
src/gromacs/trajectoryanalysis/analysismodule.cpp
src/gromacs/trajectoryanalysis/cmdlinerunner.cpp
src/gromacs/trajectoryanalysis/modules/angle.cpp
src/gromacs/trajectoryanalysis/modules/distance.cpp
src/gromacs/trajectoryanalysis/modules/freevolume.cpp
src/gromacs/trajectoryanalysis/modules/pairdist.cpp
src/gromacs/trajectoryanalysis/modules/rdf.cpp
src/gromacs/trajectoryanalysis/modules/sasa.cpp
src/gromacs/trajectoryanalysis/modules/select.cpp
src/gromacs/trajectoryanalysis/modules/trajectory.cpp
src/gromacs/trajectoryanalysis/runnercommon.cpp
src/gromacs/trajectoryanalysis/tests/moduletest.h
src/gromacs/trajectoryanalysis/tests/surfacearea.cpp
src/gromacs/trajectoryanalysis/tests/test_selection.cpp
src/gromacs/utility/exceptions.cpp
src/gromacs/utility/exceptions.h
src/gromacs/utility/fileredirector.cpp
src/gromacs/utility/filestream.h
src/gromacs/utility/ikeyvaluetreeerror.cpp
src/gromacs/utility/inmemoryserializer.h
src/gromacs/utility/keyvaluetreetransform.cpp
src/gromacs/utility/loggerbuilder.cpp
src/gromacs/utility/programcontext.cpp
src/gromacs/utility/stringstream.h
src/gromacs/utility/tests/keyvaluetreeserializer.cpp
src/gromacs/utility/variant.h
src/programs/legacymodules.cpp
src/programs/mdrun/tests/interactiveMD.cpp
src/programs/mdrun/tests/moduletest.h
src/programs/mdrun/tests/swapcoords.cpp
src/testutils/cmdlinetest.h
src/testutils/conftest.cpp
src/testutils/conftest.h
src/testutils/filematchers.cpp
src/testutils/filematchers.h
src/testutils/refdata-checkers.h
src/testutils/refdata.cpp
src/testutils/stringtest.h
src/testutils/testexceptions.h
src/testutils/testfileredirector.h
src/testutils/testinit.cpp
src/testutils/testmatchers.cpp
src/testutils/textblockmatchers.cpp
src/testutils/textblockmatchers.h
src/testutils/xvgtest.cpp
src/testutils/xvgtest.h

index 15261590fc58b49948eb39d6e2ee467bbd65c52b..56ffbb29ff48d40a5a75b5926c149498918aa8d4 100644 (file)
@@ -5,6 +5,7 @@ Checks:  clang-diagnostic-*,clang-analyzer-*,-clang-analyzer-security.insecureAP
          modernize-use-nullptr,modernize-use-emplace,
          modernize-make-unique,modernize-make-shared,
          modernize-avoid-bind,
+         modernize-use-override,
          modernize-redundant-void-arg,modernize-use-bool-literals,
          cppcoreguidelines-*,-cppcoreguidelines-pro-*,-cppcoreguidelines-owning-memory,
          -cppcoreguidelines-no-malloc,-cppcoreguidelines-special-member-functions,
index 65d42e927386104ef8654f30ba769517706e9eb5..5558050fd1e2186af97801ee8dbaa217ea721de2 100644 (file)
@@ -4,6 +4,7 @@ Checks:  clang-diagnostic-*,clang-analyzer-*,
          modernize-use-nullptr,modernize-use-emplace,
          modernize-make-unique,modernize-make-shared,
          modernize-avoid-bind,
+         modernize-use-override,
          modernize-redundant-void-arg,modernize-use-bool-literals,
          cppcoreguidelines-*,-cppcoreguidelines-pro-type-reinterpret-cast,-cppcoreguidelines-pro-type-const-cast,
          -cppcoreguidelines-pro-type-static-cast-downcast,
index 09e8733da10cc089ead0bbe8e77d169d4d0b4b7f..f68b6ca2b5cb084a2db3952f928204abad4311e6 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -96,7 +96,7 @@ class AnalysisData : public AbstractAnalysisData
          * \throws std::bad_alloc if out of memory.
          */
         AnalysisData();
-        virtual ~AnalysisData();
+        ~AnalysisData() override;
 
         /*! \brief
          * Sets the number of data sets.
@@ -140,7 +140,7 @@ class AnalysisData : public AbstractAnalysisData
          */
         void setMultipoint(bool bMultipoint);
 
-        virtual int frameCount() const;
+        int frameCount() const override;
 
         /*! \brief
          * Creates a handle for adding data.
@@ -194,8 +194,8 @@ class AnalysisData : public AbstractAnalysisData
         void finishData(AnalysisDataHandle handle);
 
     private:
-        virtual AnalysisDataFrameRef tryGetDataFrameInternal(int index) const;
-        virtual bool requestStorageInternal(int nframes);
+        AnalysisDataFrameRef tryGetDataFrameInternal(int index) const override;
+        bool requestStorageInternal(int nframes) override;
 
         class Impl;
 
index f255ae70f612e34f2e1dd7829fbccbdcb97854c0..77a7c93ef9d34f78eedefe53de340ba7f9136be2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -73,9 +73,9 @@ namespace gmx
 class AbstractAnalysisArrayData : public AbstractAnalysisData
 {
     public:
-        virtual ~AbstractAnalysisArrayData();
+        ~AbstractAnalysisArrayData() override;
 
-        virtual int frameCount() const
+        int frameCount() const override
         {
             return bReady_ ? rowCount_ : 0;
         }
@@ -206,8 +206,8 @@ class AbstractAnalysisArrayData : public AbstractAnalysisData
                                  AbstractAnalysisArrayData       *dest);
 
     private:
-        virtual AnalysisDataFrameRef tryGetDataFrameInternal(int index) const;
-        virtual bool requestStorageInternal(int nframes);
+        AnalysisDataFrameRef tryGetDataFrameInternal(int index) const override;
+        bool requestStorageInternal(int nframes) override;
 
         int                            rowCount_;
         AnalysisDataPointSetInfo       pointSetInfo_;
index e3113d226150c7d5829d4b005e144adc7098611a..68da7f0a05c2a9f8aa90f5cd7023dbb8bef6f8b6 100644 (file)
@@ -240,21 +240,21 @@ class IAnalysisDataModule
 class AnalysisDataModuleSerial : public IAnalysisDataModule
 {
     public:
-        virtual ~AnalysisDataModuleSerial() {}
+        ~AnalysisDataModuleSerial() override {}
 
-        virtual int flags() const = 0;
+        int flags() const override = 0;
 
-        virtual void dataStarted(AbstractAnalysisData *data)              = 0;
-        virtual void frameStarted(const AnalysisDataFrameHeader &frame)   = 0;
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points)   = 0;
-        virtual void frameFinished(const AnalysisDataFrameHeader &header) = 0;
-        virtual void dataFinished() = 0;
+        void dataStarted(AbstractAnalysisData *data)              override = 0;
+        void frameStarted(const AnalysisDataFrameHeader &frame)   override = 0;
+        void pointsAdded(const AnalysisDataPointSetRef &points)   override = 0;
+        void frameFinished(const AnalysisDataFrameHeader &header) override = 0;
+        void dataFinished() override = 0;
 
     private:
-        virtual bool parallelDataStarted(
+        bool parallelDataStarted(
             AbstractAnalysisData              *data,
-            const AnalysisDataParallelOptions &options);
-        virtual void frameFinishedSerial(int /*frameIndex*/) {}
+            const AnalysisDataParallelOptions &options) override;
+        void frameFinishedSerial(int /*frameIndex*/) override {}
 };
 
 /*! \brief
@@ -270,21 +270,21 @@ class AnalysisDataModuleSerial : public IAnalysisDataModule
 class AnalysisDataModuleParallel : public IAnalysisDataModule
 {
     public:
-        virtual ~AnalysisDataModuleParallel() {}
+        ~AnalysisDataModuleParallel() override {}
 
-        virtual int flags() const = 0;
+        int flags() const override = 0;
 
-        virtual bool parallelDataStarted(
+        bool parallelDataStarted(
             AbstractAnalysisData              *data,
-            const AnalysisDataParallelOptions &options)                   = 0;
-        virtual void frameStarted(const AnalysisDataFrameHeader &frame)   = 0;
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points)   = 0;
-        virtual void frameFinished(const AnalysisDataFrameHeader &header) = 0;
-        virtual void frameFinishedSerial(int index) = 0;
-        virtual void dataFinished()                 = 0;
+            const AnalysisDataParallelOptions &options)           override = 0;
+        void frameStarted(const AnalysisDataFrameHeader &frame)   override = 0;
+        void pointsAdded(const AnalysisDataPointSetRef &points)   override = 0;
+        void frameFinished(const AnalysisDataFrameHeader &header) override = 0;
+        void frameFinishedSerial(int index) override = 0;
+        void dataFinished()                 override = 0;
 
     private:
-        virtual void dataStarted(AbstractAnalysisData *data);
+        void dataStarted(AbstractAnalysisData *data) override;
 };
 
 } // namespace gmx
index 1b8f639a0281423f1a75ce51e54bd18e16d25e6d..3f73f75bdcc9e081d800f8ebafd378c282d6c2bf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -80,23 +80,23 @@ class AnalysisDataProxy : public AbstractAnalysisData,
         AnalysisDataProxy(int firstColumn, int columnSpan,
                           AbstractAnalysisData *data);
 
-        virtual int frameCount() const;
+        int frameCount() const override;
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual void dataStarted(AbstractAnalysisData *data);
-        virtual bool parallelDataStarted(
+        void dataStarted(AbstractAnalysisData *data) override;
+        bool parallelDataStarted(
             AbstractAnalysisData              *data,
-            const AnalysisDataParallelOptions &options);
-        virtual void frameStarted(const AnalysisDataFrameHeader &frame);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void frameFinishedSerial(int frameIndex);
-        virtual void dataFinished();
+            const AnalysisDataParallelOptions &options) override;
+        void frameStarted(const AnalysisDataFrameHeader &frame) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void frameFinishedSerial(int frameIndex) override;
+        void dataFinished() override;
 
     private:
-        virtual AnalysisDataFrameRef tryGetDataFrameInternal(int index) const;
-        virtual bool requestStorageInternal(int nframes);
+        AnalysisDataFrameRef tryGetDataFrameInternal(int index) const override;
+        bool requestStorageInternal(int nframes) override;
 
         AbstractAnalysisData   &source_;
         int                     firstColumn_;
index a6a26eb3ddb183aa68144d104440864f07813073..de3ec3f3068e1428115c628dc43870b40d414441 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -84,7 +84,7 @@ class AnalysisDataAverageModule : public AbstractAnalysisArrayData,
 {
     public:
         AnalysisDataAverageModule();
-        virtual ~AnalysisDataAverageModule();
+        ~AnalysisDataAverageModule() override;
 
         using AbstractAnalysisArrayData::setXAxis;
         using AbstractAnalysisArrayData::setXAxisValue;
@@ -103,13 +103,13 @@ class AnalysisDataAverageModule : public AbstractAnalysisArrayData,
          */
         void setAverageDataSets(bool bDataSets);
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual void dataStarted(AbstractAnalysisData *data);
-        virtual void frameStarted(const AnalysisDataFrameHeader &header);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void dataFinished();
+        void dataStarted(AbstractAnalysisData *data) override;
+        void frameStarted(const AnalysisDataFrameHeader &header) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void dataFinished() override;
 
         /*! \brief
          * Convenience access to the average of a data column.
@@ -166,21 +166,21 @@ class AnalysisDataFrameAverageModule : public AbstractAnalysisData,
 {
     public:
         AnalysisDataFrameAverageModule();
-        virtual ~AnalysisDataFrameAverageModule();
+        ~AnalysisDataFrameAverageModule() override;
 
-        virtual int frameCount() const;
+        int frameCount() const override;
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual void dataStarted(AbstractAnalysisData *data);
-        virtual void frameStarted(const AnalysisDataFrameHeader &header);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void dataFinished();
+        void dataStarted(AbstractAnalysisData *data) override;
+        void frameStarted(const AnalysisDataFrameHeader &header) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void dataFinished() override;
 
     private:
-        virtual AnalysisDataFrameRef tryGetDataFrameInternal(int index) const;
-        virtual bool requestStorageInternal(int nframes);
+        AnalysisDataFrameRef tryGetDataFrameInternal(int index) const override;
+        bool requestStorageInternal(int nframes) override;
 
         class Impl;
 
index 6ae776ba4968496472d947862d8ad4857276723c..2ff25a75615d50444b649d14955077d8809448b5 100644 (file)
@@ -71,7 +71,7 @@ class AnalysisDataDisplacementModule : public AbstractAnalysisData,
 {
     public:
         AnalysisDataDisplacementModule();
-        virtual ~AnalysisDataDisplacementModule();
+        ~AnalysisDataDisplacementModule() override;
 
         /*! \brief
          * Sets the largest displacement time to be calculated.
@@ -84,17 +84,17 @@ class AnalysisDataDisplacementModule : public AbstractAnalysisData,
          */
         void setMSDHistogram(const std::shared_ptr<AnalysisDataBinAverageModule> &histm);
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual void dataStarted(AbstractAnalysisData *data);
-        virtual void frameStarted(const AnalysisDataFrameHeader &header);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void dataFinished();
+        void dataStarted(AbstractAnalysisData *data) override;
+        void frameStarted(const AnalysisDataFrameHeader &header) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void dataFinished() override;
 
     private:
-        virtual AnalysisDataFrameRef tryGetDataFrameInternal(int index) const;
-        virtual bool requestStorageInternal(int nframes);
+        AnalysisDataFrameRef tryGetDataFrameInternal(int index) const override;
+        bool requestStorageInternal(int nframes) override;
 
         class Impl;
 
index a8a294d54e28c00382e4987bd7bfafbc08fdfc1a..092b0009b1efdbbfe69215618f960da69bd19095 100644 (file)
@@ -438,13 +438,13 @@ class BasicAverageHistogramModule : public AbstractAverageHistogram,
 
         using AbstractAverageHistogram::init;
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual void dataStarted(AbstractAnalysisData *data);
-        virtual void frameStarted(const AnalysisDataFrameHeader &header);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void dataFinished();
+        void dataStarted(AbstractAnalysisData *data) override;
+        void frameStarted(const AnalysisDataFrameHeader &header) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void dataFinished() override;
 
     private:
         //! Averaging helper objects for each input data set.
index a3bb56ed748484874d9d95e2ffdb270412a55aaa..4875b8926ae3e0d672e1c34f7ab63152d8defb2c 100644 (file)
@@ -263,7 +263,7 @@ typedef std::unique_ptr<AbstractAverageHistogram> AverageHistogramPointer;
 class AbstractAverageHistogram : public AbstractAnalysisArrayData
 {
     public:
-        virtual ~AbstractAverageHistogram();
+        ~AbstractAverageHistogram() override;
 
         //! Returns bin properties for the histogram.
         const AnalysisHistogramSettings &settings() const { return settings_; }
@@ -369,7 +369,7 @@ class AnalysisDataSimpleHistogramModule : public AbstractAnalysisData,
         AnalysisDataSimpleHistogramModule();
         //! Creates a histogram module with defined bin parameters.
         explicit AnalysisDataSimpleHistogramModule(const AnalysisHistogramSettings &settings);
-        virtual ~AnalysisDataSimpleHistogramModule();
+        ~AnalysisDataSimpleHistogramModule() override;
 
         /*! \brief
          * (Re)initializes the histogram from settings.
@@ -389,22 +389,22 @@ class AnalysisDataSimpleHistogramModule : public AbstractAnalysisData,
         //! Returns bin properties for the histogram.
         const AnalysisHistogramSettings &settings() const;
 
-        virtual int frameCount() const;
+        int frameCount() const override;
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual bool parallelDataStarted(
+        bool parallelDataStarted(
             AbstractAnalysisData              *data,
-            const AnalysisDataParallelOptions &options);
-        virtual void frameStarted(const AnalysisDataFrameHeader &header);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void frameFinishedSerial(int frameIndex);
-        virtual void dataFinished();
+            const AnalysisDataParallelOptions &options) override;
+        void frameStarted(const AnalysisDataFrameHeader &header) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void frameFinishedSerial(int frameIndex) override;
+        void dataFinished() override;
 
     private:
-        virtual AnalysisDataFrameRef tryGetDataFrameInternal(int index) const;
-        virtual bool requestStorageInternal(int nframes);
+        AnalysisDataFrameRef tryGetDataFrameInternal(int index) const override;
+        bool requestStorageInternal(int nframes) override;
 
         class Impl;
 
@@ -443,7 +443,7 @@ class AnalysisDataWeightedHistogramModule : public AbstractAnalysisData,
         AnalysisDataWeightedHistogramModule();
         //! \copydoc AnalysisDataSimpleHistogramModule::AnalysisDataSimpleHistogramModule(const AnalysisHistogramSettings &)
         explicit AnalysisDataWeightedHistogramModule(const AnalysisHistogramSettings &settings);
-        virtual ~AnalysisDataWeightedHistogramModule();
+        ~AnalysisDataWeightedHistogramModule() override;
 
         //! \copydoc AnalysisDataSimpleHistogramModule::init()
         void init(const AnalysisHistogramSettings &settings);
@@ -454,22 +454,22 @@ class AnalysisDataWeightedHistogramModule : public AbstractAnalysisData,
         //! \copydoc AnalysisDataSimpleHistogramModule::settings()
         const AnalysisHistogramSettings &settings() const;
 
-        virtual int frameCount() const;
+        int frameCount() const override;
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual bool parallelDataStarted(
+        bool parallelDataStarted(
             AbstractAnalysisData              *data,
-            const AnalysisDataParallelOptions &options);
-        virtual void frameStarted(const AnalysisDataFrameHeader &header);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void frameFinishedSerial(int frameIndex);
-        virtual void dataFinished();
+            const AnalysisDataParallelOptions &options) override;
+        void frameStarted(const AnalysisDataFrameHeader &header) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void frameFinishedSerial(int frameIndex) override;
+        void dataFinished() override;
 
     private:
-        virtual AnalysisDataFrameRef tryGetDataFrameInternal(int index) const;
-        virtual bool requestStorageInternal(int nframes);
+        AnalysisDataFrameRef tryGetDataFrameInternal(int index) const override;
+        bool requestStorageInternal(int nframes) override;
 
         class Impl;
 
@@ -503,7 +503,7 @@ class AnalysisDataBinAverageModule : public AbstractAnalysisArrayData,
         AnalysisDataBinAverageModule();
         //! \copydoc AnalysisDataSimpleHistogramModule::AnalysisDataSimpleHistogramModule(const AnalysisHistogramSettings &)
         explicit AnalysisDataBinAverageModule(const AnalysisHistogramSettings &settings);
-        virtual ~AnalysisDataBinAverageModule();
+        ~AnalysisDataBinAverageModule() override;
 
         //! \copydoc AnalysisDataSimpleHistogramModule::init()
         void init(const AnalysisHistogramSettings &settings);
@@ -511,13 +511,13 @@ class AnalysisDataBinAverageModule : public AbstractAnalysisArrayData,
         //! \copydoc AnalysisDataSimpleHistogramModule::settings()
         const AnalysisHistogramSettings &settings() const;
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual void dataStarted(AbstractAnalysisData *data);
-        virtual void frameStarted(const AnalysisDataFrameHeader &header);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void dataFinished();
+        void dataStarted(AbstractAnalysisData *data) override;
+        void frameStarted(const AnalysisDataFrameHeader &header) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void dataFinished() override;
 
     private:
         class Impl;
index 9278d288c81c9c947fc73c368942fa9f31b4d2af..5c120a24506be6526a0d63820a51e3d12631767f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
index 771719ef27672c9071596e8d465c6b8059fbb1d5..0e34c4583e86fa202dad145c48af63a0982cfffc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -80,7 +80,7 @@ class AnalysisDataLifetimeModule : public AbstractAnalysisArrayData,
 {
     public:
         AnalysisDataLifetimeModule();
-        virtual ~AnalysisDataLifetimeModule();
+        ~AnalysisDataLifetimeModule() override;
 
         /*! \brief
          * Sets a cumulative histogram mode.
@@ -92,13 +92,13 @@ class AnalysisDataLifetimeModule : public AbstractAnalysisArrayData,
          */
         void setCumulative(bool bCumulative);
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual void dataStarted(AbstractAnalysisData *data);
-        virtual void frameStarted(const AnalysisDataFrameHeader &header);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void dataFinished();
+        void dataStarted(AbstractAnalysisData *data) override;
+        void frameStarted(const AnalysisDataFrameHeader &header) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void dataFinished() override;
 
     private:
         class Impl;
index dfc5c8ac79e6d6cba2c8f7b3f5c67a857cc00c9c..d926224ddd27059cb37b9ced52647b1e8e7aab6a 100644 (file)
@@ -142,7 +142,7 @@ class AnalysisDataPlotSettings
 class AbstractPlotModule : public AnalysisDataModuleSerial
 {
     public:
-        virtual ~AbstractPlotModule();
+        ~AbstractPlotModule() override;
 
         /*! \brief
          * Set common settings for the plotting.
@@ -224,13 +224,13 @@ class AbstractPlotModule : public AnalysisDataModuleSerial
          */
         void setYFormat(int width, int precision, char format = 'f');
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual void dataStarted(AbstractAnalysisData *data);
-        virtual void frameStarted(const AnalysisDataFrameHeader &header);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points) = 0;
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void dataFinished();
+        void dataStarted(AbstractAnalysisData *data) override;
+        void frameStarted(const AnalysisDataFrameHeader &header) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override = 0;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void dataFinished() override;
 
     protected:
         /*! \cond libapi */
@@ -275,7 +275,7 @@ class AnalysisDataPlotModule : public AbstractPlotModule
         //! Creates AnalysisDataPlotModule and assign common settings.
         explicit AnalysisDataPlotModule(const AnalysisDataPlotSettings &settings);
 
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
 
         // Copy and assign disallowed by base.
 };
@@ -317,7 +317,7 @@ class AnalysisDataVectorPlotModule : public AbstractPlotModule
          */
         void setWriteMask(const bool bWrite[4]);
 
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
 
     private:
         bool                    bWrite_[4];
index 4f4eb296cd37ea39a3d7ecfac742fd64984f7c09..a6c412c7497e9c75ddfa17e13524ef5bfd7d18ba 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2011,2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -299,7 +299,7 @@ class AnalysisDataTest : public AnalysisDataTestFixture
         {
         }
 
-        void SetUp()
+        void SetUp() override
         {
             ASSERT_NO_THROW_GMX(setupDataObject(input_, &data_));
         }
index 41c69cd8467e23439bd68ebacd0a9b197faabeb0..fb451e6ac7fc284013ea74c78e9fd8693a0f7ab0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2011,2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -66,9 +66,9 @@ class MockAnalysisDataModule : public IAnalysisDataModule
 {
     public:
         explicit MockAnalysisDataModule(int flags);
-        virtual ~MockAnalysisDataModule();
+        ~MockAnalysisDataModule() override;
 
-        virtual int flags() const;
+        int flags() const override;
 
         MOCK_METHOD2(parallelDataStarted,
                      bool(AbstractAnalysisData              *data,
index 47110d0ac95ab375a6aa4c4ddefcaf77b152922b..9716758dfa74ead336ff79f3818036e56ff8e620 100644 (file)
@@ -101,8 +101,8 @@ class RootHelpTopic : public AbstractCompositeHelpTopic
         {
         }
 
-        virtual const char *name() const;
-        virtual const char *title() const { return title_.c_str(); }
+        const char *name() const override;
+        const char *title() const override { return title_.c_str(); }
 
         //! Adds a top-level topic and optionally marks it as exported.
         void addTopic(HelpTopicPointer topic, bool bExported)
@@ -116,11 +116,11 @@ class RootHelpTopic : public AbstractCompositeHelpTopic
         //! Exports all the top-level topics with the given exporter.
         void exportHelp(IHelpExport *exporter);
 
-        virtual void writeHelp(const HelpWriterContext &context) const;
+        void writeHelp(const HelpWriterContext &context) const override;
 
     private:
         // unused because of the writeHelp() override
-        virtual std::string helpText() const { return ""; }
+        std::string helpText() const override { return ""; }
 
         CommandLineHelpContext createContext(const HelpWriterContext &context) const;
 
@@ -366,15 +366,15 @@ class CommandsHelpTopic : public IHelpTopic
         {
         }
 
-        virtual const char *name() const { return "commands"; }
-        virtual const char *title() const { return "List of available commands"; }
-        virtual bool hasSubTopics() const { return false; }
-        virtual const IHelpTopic *findSubTopic(const char * /*name*/) const
+        const char *name() const override { return "commands"; }
+        const char *title() const override { return "List of available commands"; }
+        bool hasSubTopics() const override { return false; }
+        const IHelpTopic *findSubTopic(const char * /*name*/) const override
         {
             return nullptr;
         }
 
-        virtual void writeHelp(const HelpWriterContext &context) const;
+        void writeHelp(const HelpWriterContext &context) const override;
 
     private:
         const CommandLineHelpModuleImpl &helpModule_;
@@ -448,14 +448,14 @@ class ModuleHelpTopic : public IHelpTopic
         {
         }
 
-        virtual const char *name() const { return module_.name(); }
-        virtual const char *title() const { return nullptr; }
-        virtual bool hasSubTopics() const { return false; }
-        virtual const IHelpTopic *findSubTopic(const char * /*name*/) const
+        const char *name() const override { return module_.name(); }
+        const char *title() const override { return nullptr; }
+        bool hasSubTopics() const override { return false; }
+        const IHelpTopic *findSubTopic(const char * /*name*/) const override
         {
             return nullptr;
         }
-        virtual void writeHelp(const HelpWriterContext &context) const;
+        void writeHelp(const HelpWriterContext &context) const override;
 
     private:
         const ICommandLineModule         &module_;
@@ -522,19 +522,19 @@ class HelpExportReStructuredText : public IHelpExport
             const CommandLineHelpModuleImpl &helpModule,
             IFileOutputRedirector           *outputRedirector);
 
-        virtual void startModuleExport();
-        virtual void exportModuleHelp(
+        void startModuleExport() override;
+        void exportModuleHelp(
             const ICommandLineModule         &module,
             const std::string                &tag,
-            const std::string                &displayName);
-        virtual void finishModuleExport();
+            const std::string                &displayName) override;
+        void finishModuleExport() override;
 
-        virtual void startModuleGroupExport();
-        virtual void exportModuleGroup(const char                *title,
-                                       const ModuleGroupContents &modules);
-        virtual void finishModuleGroupExport();
+        void startModuleGroupExport() override;
+        void exportModuleGroup(const char                *title,
+                               const ModuleGroupContents &modules) override;
+        void finishModuleGroupExport() override;
 
-        virtual void exportTopic(const IHelpTopic &topic);
+        void exportTopic(const IHelpTopic &topic) override;
 
     private:
         IFileOutputRedirector          *outputRedirector_;
@@ -706,19 +706,19 @@ class HelpExportCompletion : public IHelpExport
         //! Initializes completion exporter.
         explicit HelpExportCompletion(const CommandLineHelpModuleImpl &helpModule);
 
-        virtual void startModuleExport();
-        virtual void exportModuleHelp(
+        void startModuleExport() override;
+        void exportModuleHelp(
             const ICommandLineModule         &module,
             const std::string                &tag,
-            const std::string                &displayName);
-        virtual void finishModuleExport();
+            const std::string                &displayName) override;
+        void finishModuleExport() override;
 
-        virtual void startModuleGroupExport() {}
-        virtual void exportModuleGroup(const char                * /*title*/,
-                                       const ModuleGroupContents & /*modules*/) {}
-        virtual void finishModuleGroupExport() {}
+        void startModuleGroupExport() override {}
+        void exportModuleGroup(const char                * /*title*/,
+                               const ModuleGroupContents & /*modules*/) override {}
+        void finishModuleGroupExport() override {}
 
-        virtual void exportTopic(const IHelpTopic & /*topic*/) {}
+        void exportTopic(const IHelpTopic & /*topic*/) override {}
 
     private:
         ShellCompletionWriter    bashWriter_;
@@ -842,8 +842,8 @@ class ModificationCheckingFileOutputStream : public TextOutputStream
         {
         }
 
-        virtual void write(const char *str) { contents_.write(str); }
-        virtual void close()
+        void write(const char *str) override { contents_.write(str); }
+        void close() override
         {
             const std::string &newContents = contents_.toString();
             // TODO: Redirect these for unit tests.
@@ -879,11 +879,11 @@ class ModificationCheckingFileOutputRedirector : public IFileOutputRedirector
         {
         }
 
-        virtual TextOutputStream &standardOutput()
+        TextOutputStream &standardOutput() override
         {
             return redirector_->standardOutput();
         }
-        virtual TextOutputStreamPointer openTextOutputFile(const char *filename)
+        TextOutputStreamPointer openTextOutputFile(const char *filename) override
         {
             return TextOutputStreamPointer(
                     new ModificationCheckingFileOutputStream(filename, redirector_));
index 73cc444360a70b2e3db4e04bf1a53c2bfb1eee74..497d87d700ff66916e8a371eb0f9f209a4e2b894 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -83,7 +83,7 @@ class CommandLineHelpModule : public ICommandLineModule
                               const std::string                &binaryName,
                               const CommandLineModuleMap       &modules,
                               const CommandLineModuleGroupList &groups);
-        ~CommandLineHelpModule();
+        ~CommandLineHelpModule() override;
 
         /*! \brief
          * Creates a help topic for a command-line module.
@@ -124,18 +124,18 @@ class CommandLineHelpModule : public ICommandLineModule
          */
         void setOutputRedirector(IFileOutputRedirector *output);
 
-        virtual const char *name() const { return "help"; }
-        virtual const char *shortDescription() const
+        const char *name() const override { return "help"; }
+        const char *shortDescription() const override
         {
             return "Print help information";
         }
 
-        virtual void init(CommandLineModuleSettings *settings)
+        void init(CommandLineModuleSettings *settings) override
         {
             settings->setDefaultNiceLevel(0);
         }
-        virtual int run(int argc, char *argv[]);
-        virtual void writeHelp(const CommandLineHelpContext &context) const;
+        int run(int argc, char *argv[]) override;
+        void writeHelp(const CommandLineHelpContext &context) const override;
 
     private:
         typedef CommandLineHelpModuleImpl Impl;
index 0dcf90b666bbd587f4dc61fb89f7344fb63a1232..f51d0ba3235f480c493e963d965b89c48ba45b98 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -136,8 +136,8 @@ class OptionsFilter : public OptionsVisitor
                             IOptionsFormatter         *formatter,
                             const Options             &options);
 
-        virtual void visitSection(const OptionSectionInfo &section);
-        virtual void visitOption(const OptionInfo &option);
+        void visitSection(const OptionSectionInfo &section) override;
+        void visitOption(const OptionInfo &option) override;
 
     private:
         IOptionsFormatter              *formatter_;
@@ -314,7 +314,7 @@ class SynopsisFormatter : public IOptionsFormatter
         //! Finishes formatting the synopsis.
         void finish();
 
-        virtual void formatOption(const OptionInfo &option);
+        void formatOption(const OptionInfo &option) override;
 
     private:
         const HelpWriterContext &context_;
@@ -411,7 +411,7 @@ class OptionsListFormatter : public IOptionsFormatter
             }
         }
 
-        virtual void formatOption(const OptionInfo &option);
+        void formatOption(const OptionInfo &option) override;
 
     private:
         void writeSectionStartIfNecessary()
index 1a0f3eafcd76e00283815928b025b84d0db48d05..d9ff26e43c60a91aee84e1ecb3bb59c22d1ac6c8 100644 (file)
@@ -112,27 +112,27 @@ class CMainCommandLineModule : public ICommandLineModule
         {
         }
 
-        virtual const char *name() const
+        const char *name() const override
         {
             return name_;
         }
-        virtual const char *shortDescription() const
+        const char *shortDescription() const override
         {
             return shortDescription_;
         }
 
-        virtual void init(CommandLineModuleSettings *settings)
+        void init(CommandLineModuleSettings *settings) override
         {
             if (settingsFunction_ != nullptr)
             {
                 settingsFunction_(settings);
             }
         }
-        virtual int run(int argc, char *argv[])
+        int run(int argc, char *argv[]) override
         {
             return mainFunction_(argc, argv);
         }
-        virtual void writeHelp(const CommandLineHelpContext &context) const
+        void writeHelp(const CommandLineHelpContext &context) const override
         {
             writeCommandLineHelpCMain(context, name_, mainFunction_);
         }
index 2c1ed44cc6c9ee4085b865dc04f073a05dddd36c..b17e273eb2745b4676868a22a0be01ea9e3a40ba 100644 (file)
@@ -78,11 +78,11 @@ class CommandLineOptionsModuleSettings : public ICommandLineOptionsModuleSetting
 
         const std::string &helpText() const { return helpText_; }
 
-        virtual void setHelpText(const ArrayRef<const char *const> &help)
+        void setHelpText(const ArrayRef<const char *const> &help) override
         {
             helpText_ = joinStrings(help, "\n");
         }
-        virtual void addOptionsBehavior(const OptionsBehaviorPointer &behavior)
+        void addOptionsBehavior(const OptionsBehaviorPointer &behavior) override
         {
             behaviors_.addBehavior(behavior);
         }
@@ -112,12 +112,12 @@ class CommandLineOptionsModule : public ICommandLineModule
             : name_(name), description_(description), module_(std::move(module))
         {
         }
-        virtual const char *name() const { return name_; }
-        virtual const char *shortDescription() const { return description_; }
+        const char *name() const override { return name_; }
+        const char *shortDescription() const override { return description_; }
 
-        virtual void init(CommandLineModuleSettings *settings);
-        virtual int run(int argc, char *argv[]);
-        virtual void writeHelp(const CommandLineHelpContext &context) const;
+        void init(CommandLineModuleSettings *settings) override;
+        int run(int argc, char *argv[]) override;
+        void writeHelp(const CommandLineHelpContext &context) const override;
 
     private:
         void parseOptions(int argc, char *argv[]);
index 559a315b5e1410db87f34093dc268b737d0d6051..f6dcffb3afd9ea6da93ba2966ed97926bdd0e3a1 100644 (file)
@@ -103,11 +103,11 @@ class DefaultExecutableEnvironment : public IExecutableEnvironment
         {
         }
 
-        virtual std::string getWorkingDirectory() const
+        std::string getWorkingDirectory() const override
         {
             return initialWorkingDirectory_;
         }
-        virtual std::vector<std::string> getExecutablePaths() const
+        std::vector<std::string> getExecutablePaths() const override
         {
             return Path::getExecutablePaths();
         }
index 26744ea709224b1423ee53ff615e18052a9dc766..d0c3502c797c1e73b91fe5106a62252534a6415e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -151,7 +151,7 @@ class CommandLineProgramContext : public IProgramContext
          */
         CommandLineProgramContext(int argc, const char *const argv[],
                                   ExecutableEnvironmentPointer env);
-        virtual ~CommandLineProgramContext();
+        ~CommandLineProgramContext() override;
 
         /*! \brief
          * Sets a display name for the binary.
@@ -174,7 +174,7 @@ class CommandLineProgramContext : public IProgramContext
          *
          * Does not throw.
          */
-        virtual const char *programName() const;
+        const char *programName() const override;
         /*! \brief
          * Returns a display name of the current module.
          *
@@ -183,7 +183,7 @@ class CommandLineProgramContext : public IProgramContext
          *
          * Does not throw.
          */
-        virtual const char *displayName() const;
+        const char *displayName() const override;
         /*! \brief
          * Returns the full path of the running binary.
          *
@@ -192,7 +192,7 @@ class CommandLineProgramContext : public IProgramContext
          *
          * Returns argv[0] if there was an error in finding the absolute path.
          */
-        virtual const char *fullBinaryPath() const;
+        const char *fullBinaryPath() const override;
         /*! \brief
          * Returns the installation prefix (for finding \Gromacs data files).
          *
@@ -202,13 +202,13 @@ class CommandLineProgramContext : public IProgramContext
          * Returns a hardcoded path set during configuration time if there is
          * an error in finding the library data files.
          */
-        virtual InstallationPrefixInfo installationPrefix() const;
+        InstallationPrefixInfo installationPrefix() const override;
         /*! \brief
          * Returns the full command line used to invoke the binary.
          *
          * Does not throw.
          */
-        virtual const char *commandLine() const;
+        const char *commandLine() const override;
 
     private:
         class Impl;
index 9ecb1a930c728f2f415f2589c90c80a243ba40ad..7fe52b3884e69efe859d3241d00689a61c73b4d5 100644 (file)
@@ -76,13 +76,13 @@ class OptionsListWriter : public OptionsVisitor
     public:
         const std::string &optionList() const { return optionList_; }
 
-        virtual void visitSection(const OptionSectionInfo &section)
+        void visitSection(const OptionSectionInfo &section) override
         {
             OptionsIterator iterator(section);
             iterator.acceptSections(this);
             iterator.acceptOptions(this);
         }
-        virtual void visitOption(const OptionInfo &option)
+        void visitOption(const OptionInfo &option) override
         {
             if (option.isHidden())
             {
@@ -111,13 +111,13 @@ class OptionCompletionWriter : public OptionsVisitor
     public:
         explicit OptionCompletionWriter(TextWriter *out) : out_(*out) {}
 
-        virtual void visitSection(const OptionSectionInfo &section)
+        void visitSection(const OptionSectionInfo &section) override
         {
             OptionsIterator iterator(section);
             iterator.acceptSections(this);
             iterator.acceptOptions(this);
         }
-        virtual void visitOption(const OptionInfo &option);
+        void visitOption(const OptionInfo &option) override;
 
     private:
         void writeOptionCompletion(const OptionInfo  &option,
index fde073ba03ef47f9bb7be2c776891bb374e1fe25..56e82d17fb5791ff9d9e31d4684eb3f33276c53f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -72,10 +72,10 @@ class MockModule : public gmx::ICommandLineModule
     public:
         //! Creates a mock module with the given name and description.
         MockModule(const char *name, const char *description);
-        ~MockModule();
+        ~MockModule() override;
 
-        virtual const char *name() const { return name_; }
-        virtual const char *shortDescription() const { return descr_; }
+        const char *name() const override { return name_; }
+        const char *shortDescription() const override { return descr_; }
 
         MOCK_METHOD1(init, void(gmx::CommandLineModuleSettings *settings));
         MOCK_METHOD2(run, int(int argc, char *argv[]));
@@ -105,7 +105,7 @@ class MockOptionsModule : public gmx::ICommandLineOptionsModule
 {
     public:
         MockOptionsModule();
-        ~MockOptionsModule();
+        ~MockOptionsModule() override;
 
         MOCK_METHOD1(init, void(gmx::CommandLineModuleSettings *settings));
         MOCK_METHOD2(initOptions, void(gmx::IOptionsContainer *options, gmx::ICommandLineOptionsModuleSettings *settings));
@@ -122,7 +122,7 @@ class CommandLineModuleManagerTestBase : public gmx::test::StringTestBase
 {
     public:
         CommandLineModuleManagerTestBase();
-        ~CommandLineModuleManagerTestBase();
+        ~CommandLineModuleManagerTestBase() override;
 
         //! Creates the manager to run the given command line.
         void initManager(const CommandLine &args, const char *realBinaryName);
index 4cdf6d1f8bd39cf4bcef2230a997503d7f442385..3adc46c81fb6021c575f6eddb4cc23790bf1d1aa 100644 (file)
@@ -80,11 +80,11 @@ class TestExecutableEnvironment : public gmx::IExecutableEnvironment
         {
         }
 
-        virtual std::string getWorkingDirectory() const
+        std::string getWorkingDirectory() const override
         {
             return workingDirectory_;
         }
-        virtual std::vector<std::string> getExecutablePaths() const
+        std::vector<std::string> getExecutablePaths() const override
         {
             return path_;
         }
index f38c38ee121c20eca2309fe5496bbf2b745fda2e..2717afa8c589ac29da94edb3138f9fb270bcb69c 100644 (file)
@@ -78,7 +78,7 @@ class ParseCommonArgsTest : public ::testing::Test
             : oenv_(nullptr), fileCount_(0)
         {
         }
-        virtual ~ParseCommonArgsTest()
+        ~ParseCommonArgsTest() override
         {
             output_env_done(oenv_);
         }
index 88f45342b929ae5993f6516be5cf7907817ce781..7918b005e49389e49e622e45e062eb8ee3f0783a 100644 (file)
@@ -113,9 +113,9 @@ class PmeTestEnvironment : public ::testing::Environment
 
     public:
         //! This is called by GTest framework once to query the hardware
-        virtual void SetUp();
+        void SetUp() override;
         //! This is called by GTest framework once to clean up
-        virtual void TearDown();
+        void TearDown() override;
         //! Get available hardware contexts.
         const TestHardwareContexts &getHardwareContexts() const {return hardwareContexts_; }
 };
index 3b9dd87ee25bf6ccd956650129c6796d456c74a5..ac55d3845229c740048cb8309d8648d09bfc4f1a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -104,7 +104,7 @@ class BaseFFTTest : public ::testing::Test
             checker_.setDefaultTolerance(
                     gmx::test::relativeToleranceAsPrecisionDependentUlp(10.0, 64, 512));
         }
-        ~BaseFFTTest()
+        ~BaseFFTTest() override
         {
             gmx_fft_cleanup();
         }
@@ -121,7 +121,7 @@ class FFTTest : public BaseFFTTest
         FFTTest() : fft_(nullptr)
         {
         }
-        ~FFTTest()
+        ~FFTTest() override
         {
             if (fft_)
             {
@@ -137,7 +137,7 @@ class ManyFFTTest : public BaseFFTTest
         ManyFFTTest() : fft_(nullptr)
         {
         }
-        ~ManyFFTTest()
+        ~ManyFFTTest() override
         {
             if (fft_)
             {
@@ -161,7 +161,7 @@ class FFFTest3D : public BaseFFTTest
         FFFTest3D() : fft_(nullptr)
         {
         }
-        ~FFFTest3D()
+        ~FFFTest3D() override
         {
             if (fft_)
             {
index bb9a6333d6d3df2365ae52c00639a8c43c548473..848e936c801cc274091c09016f11bf4bb44e239c 100644 (file)
@@ -143,15 +143,15 @@ class FileIOXdrSerializer : public ISerializer
     public:
         explicit FileIOXdrSerializer(t_fileio *fio) : fio_(fio) {}
 
-        virtual bool reading() const;
-
-        virtual void doBool(bool *value);
-        virtual void doUChar(unsigned char *value);
-        virtual void doInt(int *value);
-        virtual void doInt64(int64_t *value);
-        virtual void doFloat(float *value);
-        virtual void doDouble(double *value);
-        virtual void doString(std::string *value);
+        bool reading() const override;
+
+        void doBool(bool *value) override;
+        void doUChar(unsigned char *value) override;
+        void doInt(int *value) override;
+        void doInt64(int64_t *value) override;
+        void doFloat(float *value) override;
+        void doDouble(double *value) override;
+        void doString(std::string *value) override;
 
     private:
         t_fileio *fio_;
index 23e8f91a397395570c2f72139830a8643625e33a..52ba9201cda21ed7ec8b6cc580eae8f6f2b3431f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -89,7 +89,7 @@ class StructureIORoundtripTest : public gmx::test::StringTestBase,
             testFilename_ =
                 fileManager_.getTemporaryFilePath(getFileSuffix("test"));
         }
-        ~StructureIORoundtripTest()
+        ~StructureIORoundtripTest() override
         {
             if (testTop_ != nullptr)
             {
index 06c211e5da1fecb2da7a070a81ddd32c4945ab2d..1d31fb31f58a653e439a0df06ca542d807efa6d3 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
index 46eab8301ccbc80ac0b5dd686af12e918b8e3fc7..13c9276c751daeb7c75169ecf6c977f46e44a387 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
index d08dc682868679ac6a97865ceba3ee17662a176a..09e15415a012927662a96a4044cd27f2aea768bc 100644 (file)
@@ -335,17 +335,17 @@ class InsertMolecules : public ICommandLineOptionsModule, public ITopologyProvid
         }
 
         // From ITopologyProvider
-        virtual gmx_mtop_t *getTopology(bool /*required*/) { return &top_; }
-        virtual int getAtomCount() { return 0; }
+        gmx_mtop_t *getTopology(bool /*required*/) override { return &top_; }
+        int getAtomCount() override { return 0; }
 
         // From ICommandLineOptionsModule
-        virtual void init(CommandLineModuleSettings * /*settings*/)
+        void init(CommandLineModuleSettings * /*settings*/) override
         {
         }
-        virtual void initOptions(IOptionsContainer                 *options,
-                                 ICommandLineOptionsModuleSettings *settings);
-        virtual void optionsFinished();
-        virtual int run();
+        void initOptions(IOptionsContainer                 *options,
+                         ICommandLineOptionsModuleSettings *settings) override;
+        void optionsFinished() override;
+        int run() override;
 
     private:
         SelectionCollection selections_;
index 131b45c5032a0632e9c6e3c6be33851bcc0898af..4e3701703c28f48c4996d29e5ddc1c3aeda1d912 100644 (file)
@@ -1718,7 +1718,7 @@ class MdpErrorHandler : public gmx::IKeyValueTreeErrorHandler
             mapping_ = &mapping;
         }
 
-        virtual bool onError(gmx::UserInputError *ex, const gmx::KeyValueTreePath &context)
+        bool onError(gmx::UserInputError *ex, const gmx::KeyValueTreePath &context) override
         {
             ex->prependContext(gmx::formatString("Error in mdp option \"%s\":",
                                                  getOptionName(context).c_str()));
index e9c7f0fa9fdb1c25f94c187e07cb02cf51950d32..e4645b9c1ffd6b3acd7159510fd1abc019108d9d 100644 (file)
@@ -78,7 +78,7 @@ class GetIrTest : public ::testing::Test
             snew(opts_.include, STRLEN);
             snew(opts_.define, STRLEN);
         }
-        ~GetIrTest()
+        ~GetIrTest() override
         {
             done_inputrec_strings();
             sfree(opts_.include);
index ec592cb7df1baf28060e836653f12e2895eb8717..3ee5e443f5589e21a5733e481ffe5cb7913c50fa 100644 (file)
@@ -61,7 +61,7 @@ class GpuTest : public ::testing::Test
         //! Constructor
         GpuTest();
         //! Destructor
-        ~GpuTest();
+        ~GpuTest() override;
         //! Getter for convenience in testing
         bool haveValidGpus() const;
 };
index 294dd7b3e0ece4edc7280b0785001f8642a35552..459851e17bac6798b32a420596c7e80f105570be 100644 (file)
@@ -136,7 +136,7 @@ class ShakeTest : public ::testing::Test
     public:
         /*! \brief Set up data for test cases to use when constructing
             their input */
-        void SetUp()
+        void SetUp() override
         {
             inverseMassesDatabase_.push_back(2.0);
             inverseMassesDatabase_.push_back(3.0);
index b867b42640763868998373d95e1f55ba7acf2e88..7cb47cb58cee996ddb722885f0dd95d9ef63443a 100644 (file)
@@ -74,12 +74,12 @@ class MDModules::Impl : public IMDOutputProvider
         }
 
         // From IMDOutputProvider
-        virtual void initOutput(FILE *fplog, int nfile, const t_filenm fnm[],
-                                bool bAppendFiles, const gmx_output_env_t *oenv)
+        void initOutput(FILE *fplog, int nfile, const t_filenm fnm[],
+                        bool bAppendFiles, const gmx_output_env_t *oenv) override
         {
             field_->outputProvider()->initOutput(fplog, nfile, fnm, bAppendFiles, oenv);
         }
-        virtual void finishOutput()
+        void finishOutput() override
         {
             field_->outputProvider()->finishOutput();
         }
index 31b47ef60cdf90ec67d9470af0612a8a2c9e9e1d..dae1133158a336b8d27da7bf3ad142bf48a5154f 100644 (file)
@@ -62,11 +62,11 @@ class MockThreadAffinityAccess : public IThreadAffinityAccess
 {
     public:
         MockThreadAffinityAccess();
-        ~MockThreadAffinityAccess();
+        ~MockThreadAffinityAccess() override;
 
         void setSupported(bool supported) { supported_ = supported; }
 
-        virtual bool isThreadAffinitySupported() const { return supported_; }
+        bool isThreadAffinitySupported() const override { return supported_; }
         MOCK_METHOD1(setCurrentThreadAffinityToCore, bool(int core));
 
     private:
index d3a881f36f315a6ed336499dd3f577f39da95fa6..e71fa8e20e943ca00238922c71ecf321c648706b 100644 (file)
@@ -70,11 +70,11 @@ namespace
 class DefaultThreadAffinityAccess : public gmx::IThreadAffinityAccess
 {
     public:
-        virtual bool isThreadAffinitySupported() const
+        bool isThreadAffinitySupported() const override
         {
             return tMPI_Thread_setaffinity_support() == TMPI_SETAFFINITY_SUPPORT_YES;
         }
-        virtual bool setCurrentThreadAffinityToCore(int core)
+        bool setCurrentThreadAffinityToCore(int core) override
         {
             const int ret = tMPI_Thread_setaffinity_single(tMPI_Thread_self(), core);
             return ret == 0;
index 36cae329801cf80bdb1e27900a4a102bf7fc9998..c6840207493713bc7d8faad3263b3833a1c8d8fd 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -68,13 +68,13 @@ namespace gmx
 class AbstractSimpleHelpTopic : public IHelpTopic
 {
     public:
-        virtual const char *name() const  = 0;
-        virtual const char *title() const = 0;
+        const char *name() const  override = 0;
+        const char *title() const override = 0;
 
-        virtual bool hasSubTopics() const;
-        virtual const IHelpTopic *findSubTopic(const char *name) const;
+        bool hasSubTopics() const override;
+        const IHelpTopic *findSubTopic(const char *name) const override;
 
-        virtual void writeHelp(const HelpWriterContext &context) const;
+        void writeHelp(const HelpWriterContext &context) const override;
 
     protected:
         /*! \brief
@@ -107,15 +107,15 @@ class AbstractCompositeHelpTopic : public IHelpTopic
 {
     public:
         AbstractCompositeHelpTopic();
-        virtual ~AbstractCompositeHelpTopic();
+        ~AbstractCompositeHelpTopic() override;
 
-        virtual const char *name() const  = 0;
-        virtual const char *title() const = 0;
+        const char *name() const  override = 0;
+        const char *title() const override = 0;
 
-        virtual bool hasSubTopics() const;
-        virtual const IHelpTopic *findSubTopic(const char *name) const;
+        bool hasSubTopics() const override;
+        const IHelpTopic *findSubTopic(const char *name) const override;
 
-        virtual void writeHelp(const HelpWriterContext &context) const;
+        void writeHelp(const HelpWriterContext &context) const override;
 
         /*! \brief
          * Adds a given topic as a subtopic of this topic.
@@ -224,17 +224,17 @@ template <class HelpText>
 class SimpleHelpTopic : public AbstractSimpleHelpTopic
 {
     public:
-        virtual const char *name() const
+        const char *name() const override
         {
             return HelpText::name;
         }
-        virtual const char *title() const
+        const char *title() const override
         {
             return HelpText::title;
         }
 
     protected:
-        virtual std::string helpText() const
+        std::string helpText() const override
         {
             return joinStrings(HelpText::text, "\n");
         }
@@ -259,19 +259,19 @@ class CompositeHelpTopic : public AbstractCompositeHelpTopic
     public:
         // copydocs are needed with Doxygen 1.8.10, but not 1.8.5...
         //! \copydoc gmx::AbstractCompositeHelpTopic::name()
-        virtual const char *name() const
+        const char *name() const override
         {
             return HelpText::name;
         }
         //! \copydoc gmx::AbstractCompositeHelpTopic::title()
-        virtual const char *title() const
+        const char *title() const override
         {
             return HelpText::title;
         }
 
     protected:
         //! \copydoc gmx::AbstractCompositeHelpTopic::helpText()
-        virtual std::string helpText() const
+        std::string helpText() const override
         {
             return joinStrings(HelpText::text, "\n");
         }
index 61bc1b9168f862facb0452deff642c50414c1302..831b22fccf29d3b7b180b6356745ca81053617e9 100644 (file)
@@ -244,11 +244,11 @@ class WrapperToString : public IWrapper
         {
         }
 
-        virtual TextLineWrapperSettings &settings()
+        TextLineWrapperSettings &settings() override
         {
             return wrapper_.settings();
         }
-        virtual void wrap(const std::string &text)
+        void wrap(const std::string &text) override
         {
             result_.append(wrapper_.wrapToString(text));
         }
@@ -272,11 +272,11 @@ class WrapperToVector : public IWrapper
         {
         }
 
-        virtual TextLineWrapperSettings &settings()
+        TextLineWrapperSettings &settings() override
         {
             return wrapper_.settings();
         }
-        virtual void wrap(const std::string &text)
+        void wrap(const std::string &text) override
         {
             const std::vector<std::string> &lines = wrapper_.wrapToVector(text);
             result_.insert(result_.end(), lines.begin(), lines.end());
index e55f03eac596f28695127db3518a59832227eb10..5151087245773a3514028fa216eb1143ee28e911 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -61,10 +61,10 @@ class MockHelpTopic : public AbstractCompositeHelpTopic
             const char *name, const char *title, const char *text);
 
         MockHelpTopic(const char *name, const char *title, const char *text);
-        virtual ~MockHelpTopic();
+        ~MockHelpTopic() override;
 
-        virtual const char *name() const;
-        virtual const char *title() const;
+        const char *name() const override;
+        const char *title() const override;
 
         MOCK_CONST_METHOD1(writeHelp, void(const HelpWriterContext &context));
 
@@ -84,7 +84,7 @@ class MockHelpTopic : public AbstractCompositeHelpTopic
         }
 
     private:
-        virtual std::string helpText() const;
+        std::string helpText() const override;
 
         const char             *name_;
         const char             *title_;
index e56bfb4ca14093364b92d4f3c81aed58d3679bd3..e62f26fcbf2bf30c841c7119ed34b906915dbfce 100644 (file)
@@ -101,7 +101,7 @@ class AbstractOptionSectionHandle : public IOptionsContainerWithSections
     public:
         // From IOptionsContainer
         //! \copydoc IOptionsContainer::addGroup()
-        virtual IOptionsContainer &addGroup();
+        IOptionsContainer &addGroup() override;
 
     protected:
         //! \cond libapi
@@ -132,10 +132,10 @@ class AbstractOptionSectionHandle : public IOptionsContainerWithSections
 
     private:
         // From IOptionsContainerWithSections
-        virtual internal::OptionSectionImpl *
-        addSectionImpl(const AbstractOptionSection &section);
+        internal::OptionSectionImpl *
+        addSectionImpl(const AbstractOptionSection &section) override;
         // From IOptionsContainer
-        virtual OptionInfo *addOptionImpl(const AbstractOption &settings);
+        OptionInfo *addOptionImpl(const AbstractOption &settings) override;
 
         /*! \brief
          * Implementation helper for the template method.
index c409787effbe64efe564d516bbd46f2f56efac6e..6f3b73a3fe6b3a9d7d11c565f915c65e79fa54a1 100644 (file)
@@ -102,8 +102,8 @@ class BooleanOption : public OptionTemplate<bool, BooleanOption>
 
     private:
         //! Creates a BooleanOptionStorage object.
-        virtual AbstractOptionStorage *createStorage(
-            const OptionManagerContainer &managers) const;
+        AbstractOptionStorage *createStorage(
+            const OptionManagerContainer &managers) const override;
 };
 
 /*! \brief
@@ -145,8 +145,8 @@ class IntegerOption : public OptionTemplate<int, IntegerOption>
 
     private:
         //! Creates an IntegerOptionStorage object.
-        virtual AbstractOptionStorage *createStorage(
-            const OptionManagerContainer &managers) const;
+        AbstractOptionStorage *createStorage(
+            const OptionManagerContainer &managers) const override;
 
         /*! \brief
          * Needed to initialize IntegerOptionStorage from this class without
@@ -175,8 +175,8 @@ class Int64Option : public OptionTemplate<int64_t, Int64Option>
 
     private:
         //! Creates an Int64OptionStorage object.
-        virtual AbstractOptionStorage *createStorage(
-            const OptionManagerContainer &managers) const;
+        AbstractOptionStorage *createStorage(
+            const OptionManagerContainer &managers) const override;
 
         /*! \brief
          * Needed to initialize Int64OptionStorage from this class without
@@ -221,8 +221,8 @@ class DoubleOption : public OptionTemplate<double, DoubleOption>
 
     private:
         //! Creates a DoubleOptionStorage object.
-        virtual AbstractOptionStorage *createStorage(
-            const OptionManagerContainer &managers) const;
+        AbstractOptionStorage *createStorage(
+            const OptionManagerContainer &managers) const override;
 
         bool bTime_;
 
@@ -260,8 +260,8 @@ class FloatOption : public OptionTemplate<float, FloatOption>
 
     private:
         //! Creates a FloatOptionStorage object.
-        virtual AbstractOptionStorage *createStorage(
-            const OptionManagerContainer &managers) const;
+        AbstractOptionStorage *createStorage(
+            const OptionManagerContainer &managers) const override;
 
         bool bTime_;
 
@@ -358,8 +358,8 @@ class StringOption : public OptionTemplate<std::string, StringOption>
 
     private:
         //! Creates a StringOptionStorage object.
-        virtual AbstractOptionStorage *createStorage(
-            const OptionManagerContainer &managers) const;
+        AbstractOptionStorage *createStorage(
+            const OptionManagerContainer &managers) const override;
 
         const char *const      *enumValues_;
         int                     enumValuesCount_;
@@ -410,9 +410,9 @@ class EnumIndexStore : public IOptionValueStore<int>
             }
         }
 
-        virtual int valueCount() { return static_cast<int>(intStore_.size()); }
-        virtual ArrayRef<int> values() { return intStore_; }
-        virtual void clear()
+        int valueCount() override { return static_cast<int>(intStore_.size()); }
+        ArrayRef<int> values() override { return intStore_; }
+        void clear() override
         {
             intStore_.clear();
             if (storeVector_ != nullptr)
@@ -420,7 +420,7 @@ class EnumIndexStore : public IOptionValueStore<int>
                 storeVector_->clear();
             }
         }
-        virtual void reserve(size_t count)
+        void reserve(size_t count) override
         {
             intStore_.reserve(intStore_.size() + count);
             if (storeVector_ != nullptr)
@@ -428,7 +428,7 @@ class EnumIndexStore : public IOptionValueStore<int>
                 storeVector_->reserve(storeVector_->size() + count);
             }
         }
-        virtual void append(const int &value)
+        void append(const int &value) override
         {
             const size_t count = intStore_.size();
             intStore_.push_back(value);
@@ -569,8 +569,8 @@ class EnumOption : public OptionTemplate<EnumType, EnumOption<EnumType> >
         }
 
         //! Creates a EnumOptionStorage object.
-        virtual AbstractOptionStorage *createStorage(
-            const OptionManagerContainer & /*managers*/) const
+        AbstractOptionStorage *createStorage(
+            const OptionManagerContainer & /*managers*/) const override
         {
             // TODO: Implement storeCount() if necessary.
             return internal::createEnumOptionStorage(
index 4b41bc8e4cbff41ca988a02920d990a814052798..847af90eb7183972d8ac9d262f321660989566ff 100644 (file)
@@ -72,15 +72,15 @@ class BooleanOptionStorage : public OptionStorageTemplateSimple<bool>
         {
         }
 
-        virtual OptionInfo &optionInfo() { return info_; }
-        virtual std::string typeString() const { return "bool"; }
-        virtual std::string formatSingleValue(const bool &value) const;
+        OptionInfo &optionInfo() override { return info_; }
+        std::string typeString() const override { return "bool"; }
+        std::string formatSingleValue(const bool &value) const override;
 
         //! \copydoc BooleanOptionInfo::defaultValue()
         bool defaultValue() const { return valueCount() > 0 && values()[0]; }
 
     private:
-        virtual void initConverter(ConverterType *converter);
+        void initConverter(ConverterType *converter) override;
 
         BooleanOptionInfo       info_;
 };
@@ -97,14 +97,14 @@ class IntegerOptionStorage : public OptionStorageTemplateSimple<int>
         {
         }
 
-        virtual OptionInfo &optionInfo() { return info_; }
-        virtual std::string typeString() const
+        OptionInfo &optionInfo() override { return info_; }
+        std::string typeString() const override
         { return isVector() ? "vector" : "int"; }
-        virtual std::string formatSingleValue(const int &value) const;
+        std::string formatSingleValue(const int &value) const override;
 
     private:
-        virtual void initConverter(ConverterType *converter);
-        virtual void processSetValues(ValueList *values);
+        void initConverter(ConverterType *converter) override;
+        void processSetValues(ValueList *values) override;
 
         IntegerOptionInfo       info_;
 };
@@ -121,12 +121,12 @@ class Int64OptionStorage : public OptionStorageTemplateSimple<int64_t>
         {
         }
 
-        virtual OptionInfo &optionInfo() { return info_; }
-        virtual std::string typeString() const { return "int"; }
-        virtual std::string formatSingleValue(const int64_t &value) const;
+        OptionInfo &optionInfo() override { return info_; }
+        std::string typeString() const override { return "int"; }
+        std::string formatSingleValue(const int64_t &value) const override;
 
     private:
-        virtual void initConverter(ConverterType *converter);
+        void initConverter(ConverterType *converter) override;
 
         Int64OptionInfo       info_;
 };
@@ -140,9 +140,9 @@ class DoubleOptionStorage : public OptionStorageTemplateSimple<double>
         //! \copydoc IntegerOptionStorage::IntegerOptionStorage()
         explicit DoubleOptionStorage(const DoubleOption &settings);
 
-        virtual OptionInfo &optionInfo() { return info_; }
-        virtual std::string typeString() const;
-        virtual std::string formatSingleValue(const double &value) const;
+        OptionInfo &optionInfo() override { return info_; }
+        std::string typeString() const override;
+        std::string formatSingleValue(const double &value) const override;
 
         //! \copydoc DoubleOptionInfo::isTime()
         bool isTime() const { return bTime_; }
@@ -150,9 +150,9 @@ class DoubleOptionStorage : public OptionStorageTemplateSimple<double>
         void setScaleFactor(double factor);
 
     private:
-        virtual void initConverter(ConverterType *converter);
-        virtual double processValue(const double &value) const;
-        virtual void processSetValues(ValueList *values);
+        void initConverter(ConverterType *converter) override;
+        double processValue(const double &value) const override;
+        void processSetValues(ValueList *values) override;
 
         DoubleOptionInfo        info_;
         bool                    bTime_;
@@ -168,9 +168,9 @@ class FloatOptionStorage : public OptionStorageTemplateSimple<float>
         //! \copydoc IntegerOptionStorage::IntegerOptionStorage()
         explicit FloatOptionStorage(const FloatOption &settings);
 
-        virtual OptionInfo &optionInfo() { return info_; }
-        virtual std::string typeString() const;
-        virtual std::string formatSingleValue(const float &value) const;
+        OptionInfo &optionInfo() override { return info_; }
+        std::string typeString() const override;
+        std::string formatSingleValue(const float &value) const override;
 
         //! \copydoc DoubleOptionStorage::isTime()
         bool isTime() const { return bTime_; }
@@ -178,9 +178,9 @@ class FloatOptionStorage : public OptionStorageTemplateSimple<float>
         void setScaleFactor(double factor);
 
     private:
-        virtual void initConverter(ConverterType *converter);
-        virtual float processValue(const float &value) const;
-        virtual void processSetValues(ValueList *values);
+        void initConverter(ConverterType *converter) override;
+        float processValue(const float &value) const override;
+        void processSetValues(ValueList *values) override;
 
         FloatOptionInfo         info_;
         bool                    bTime_;
@@ -196,18 +196,18 @@ class StringOptionStorage : public OptionStorageTemplateSimple<std::string>
         //! \copydoc DoubleOptionStorage::DoubleOptionStorage()
         explicit StringOptionStorage(const StringOption &settings);
 
-        virtual OptionInfo &optionInfo() { return info_; }
-        virtual std::string typeString() const
+        OptionInfo &optionInfo() override { return info_; }
+        std::string typeString() const override
         { return allowed_.empty() ? "string" : "enum"; }
-        virtual std::string formatExtraDescription() const;
-        virtual std::string formatSingleValue(const std::string &value) const;
+        std::string formatExtraDescription() const override;
+        std::string formatSingleValue(const std::string &value) const override;
 
         //! \copydoc StringOptionInfo::allowedValues()
         const ValueList &allowedValues() const { return allowed_; }
 
     private:
-        virtual void initConverter(ConverterType *converter);
-        virtual std::string processValue(const std::string &value) const;
+        void initConverter(ConverterType *converter) override;
+        std::string processValue(const std::string &value) const override;
 
         StringOptionInfo        info_;
         ValueList               allowed_;
@@ -240,17 +240,17 @@ class EnumOptionStorage : public OptionStorageTemplateSimple<int>
                           int defaultValue, int defaultValueIfSet,
                           StorePointer store);
 
-        virtual OptionInfo &optionInfo() { return info_; }
-        virtual std::string typeString() const { return "enum"; }
-        virtual std::string formatExtraDescription() const;
-        virtual std::string formatSingleValue(const int &value) const;
-        virtual Variant normalizeValue(const int &value) const;
+        OptionInfo &optionInfo() override { return info_; }
+        std::string typeString() const override { return "enum"; }
+        std::string formatExtraDescription() const override;
+        std::string formatSingleValue(const int &value) const override;
+        Variant normalizeValue(const int &value) const override;
 
         //! \copydoc EnumOptionInfo::allowedValues()
         const std::vector<std::string> &allowedValues() const { return allowed_; }
 
     private:
-        virtual void initConverter(ConverterType *converter);
+        void initConverter(ConverterType *converter) override;
 
         EnumOptionInfo            info_;
         std::vector<std::string>  allowed_;
index c245326e6147d65e86d2ea24261c2b9fe69be3dc..d792dab42d4d633b92c3d8a07bc0b8f6a03efb8d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -198,8 +198,8 @@ class FileNameOption : public OptionTemplate<std::string, FileNameOption>
         using MyBase::defaultValueIfSet;
 
         //! Creates a FileNameOptionStorage object.
-        virtual AbstractOptionStorage *createStorage(
-            const OptionManagerContainer &managers) const;
+        AbstractOptionStorage *createStorage(
+            const OptionManagerContainer &managers) const override;
 
         OptionFileType          optionType_;
         int                     legacyType_;
index a8182162b2f2817a2d0f5acbd47cf42f5b6af318..b1a42a80577b371cdbaa3a5a7b7fbf59f8c13714 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -83,7 +83,7 @@ class FileNameOptionManager : public IOptionManager
 {
     public:
         FileNameOptionManager();
-        virtual ~FileNameOptionManager();
+        ~FileNameOptionManager() override;
 
         /*! \brief
          * Redirects file existence checks.
index 76f18273b81bafa7a6aaab4a0e87d7c7296e16d2..16fc4ef3c37969bc98ec129d16554d7b4d6a741a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -70,10 +70,10 @@ class FileNameOptionStorage : public OptionStorageTemplateSimple<std::string>
         FileNameOptionStorage(const FileNameOption  &settings,
                               FileNameOptionManager *manager);
 
-        virtual OptionInfo &optionInfo() { return info_; }
-        virtual std::string typeString() const;
-        virtual std::string formatExtraDescription() const;
-        virtual std::string formatSingleValue(const std::string &value) const;
+        OptionInfo &optionInfo() override { return info_; }
+        std::string typeString() const override;
+        std::string formatExtraDescription() const override;
+        std::string formatSingleValue(const std::string &value) const override;
 
         //! \copydoc FileNameOptionInfo::isInputFile()
         bool isInputFile() const { return bRead_ && !bWrite_; }
@@ -100,9 +100,9 @@ class FileNameOptionStorage : public OptionStorageTemplateSimple<std::string>
         ArrayRef<const int> fileTypes() const;
 
     private:
-        virtual void initConverter(ConverterType *converter);
-        virtual std::string processValue(const std::string &value) const;
-        virtual void processAll();
+        void initConverter(ConverterType *converter) override;
+        std::string processValue(const std::string &value) const override;
+        void processAll() override;
 
         FileNameOptionInfo      info_;
         FileNameOptionManager  *manager_;
index 29d8f9754cef906e2c859d3877a64620f91fbdb2..a9c04118eab5d6f6dbcab6173d5472dc61d9ffd7 100644 (file)
@@ -95,7 +95,7 @@ class IOptionsContainerWithSections : public IOptionsContainer
     protected:
         // Disallow deletion through the interface.
         // (no need for the virtual, but some compilers warn otherwise)
-        virtual ~IOptionsContainerWithSections();
+        ~IOptionsContainerWithSections() override;
 
         /*! \brief
          * Adds a section to this container.
index d06ffb48d30a29c84e942f863a9a96f640cf7595..acaccc8c261ce2850a127b1c97bbfa178661c902 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -95,8 +95,8 @@ class OptionSectionImpl : public IOptionsContainerWithSections
                 explicit Group(OptionSectionImpl *parent) : parent_(parent) {}
 
                 // From IOptionsContainer
-                virtual IOptionsContainer &addGroup();
-                virtual OptionInfo *addOptionImpl(const AbstractOption &settings);
+                IOptionsContainer &addGroup() override;
+                OptionInfo *addOptionImpl(const AbstractOption &settings) override;
 
                 //! Containing options object.
                 OptionSectionImpl  *parent_;
@@ -131,11 +131,11 @@ class OptionSectionImpl : public IOptionsContainerWithSections
         }
 
         // From IOptionsContainerWithSections
-        virtual OptionSectionImpl *addSectionImpl(const AbstractOptionSection &section);
+        OptionSectionImpl *addSectionImpl(const AbstractOptionSection &section) override;
 
         // From IOptionsContainer
-        virtual IOptionsContainer &addGroup();
-        virtual OptionInfo *addOptionImpl(const AbstractOption &settings);
+        IOptionsContainer &addGroup() override;
+        OptionInfo *addOptionImpl(const AbstractOption &settings) override;
 
         //! Returns section info object for this section.
         OptionSectionInfo       &info() { return info_; }
index a4ba843633ac1889012a00e235958f30b8167844..ae0a98c3207c822834bdfefbc07ce672c663c1d9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2014,2015,2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -104,7 +104,7 @@ class Options : public IOptionsContainerWithSections
     public:
         //! Initializes an empty options root container.
         Options();
-        ~Options();
+        ~Options() override;
 
         /*! \brief
          * Adds an option manager.
@@ -129,7 +129,7 @@ class Options : public IOptionsContainerWithSections
         void addManager(IOptionManager *manager);
 
         // From IOptionsContainer
-        virtual IOptionsContainer &addGroup();
+        IOptionsContainer &addGroup() override;
 
         //! Returns a handle to the root section.
         OptionSectionInfo       &rootSection();
@@ -154,10 +154,10 @@ class Options : public IOptionsContainerWithSections
 
     private:
         // From IOptionsContainerWithSections
-        virtual internal::OptionSectionImpl *
-        addSectionImpl(const AbstractOptionSection &section);
+        internal::OptionSectionImpl *
+        addSectionImpl(const AbstractOptionSection &section) override;
         // From IOptionsContainer
-        virtual OptionInfo *addOptionImpl(const AbstractOption &settings);
+        OptionInfo *addOptionImpl(const AbstractOption &settings) override;
 
         PrivateImplPointer<internal::OptionsImpl> impl_;
 
index bfe7d107ea82a8725b06b6e86f824c1daf6e2380..80835ecf5e3af45852deed42a9be2dd9aa4d948e 100644 (file)
@@ -48,9 +48,9 @@ namespace
 class OptionSectionStorage : public IOptionSectionStorage
 {
     public:
-        virtual void initStorage() {}
-        virtual void startSection() {}
-        virtual void finishSection() {}
+        void initStorage() override {}
+        void startSection() override {}
+        void finishSection() override {}
 };
 
 }   // namespace
index 781829649af3aa7742d8d3749c744febc7298990..aea85fcf20073af44e25e8cd8c2da0f893f6794f 100644 (file)
@@ -71,7 +71,7 @@ class OptionSection : public AbstractOptionSection
         explicit OptionSection(const char *name) : AbstractOptionSection(name) {}
 
     private:
-        virtual std::unique_ptr<IOptionSectionStorage> createStorage() const;
+        std::unique_ptr<IOptionSectionStorage> createStorage() const override;
 };
 
 /*! \brief
index 43a745f1c43098ff05763cafbed79cf2da7b26c6..5659fae1201d8b69e175855d7ecac7b7a61b6597 100644 (file)
@@ -98,11 +98,11 @@ class OptionStorageTemplate : public AbstractOptionStorage
         // the declarations are still included for clarity.
         // The various copydoc calls are needed with Doxygen 1.8.10, although
         // things work without with 1.8.5...
-        virtual std::string typeString() const = 0;
+        std::string typeString() const override = 0;
         //! \copydoc gmx::AbstractOptionStorage::valueCount()
-        virtual int valueCount() const { return store_->valueCount(); }
+        int valueCount() const override { return store_->valueCount(); }
         //! \copydoc gmx::AbstractOptionStorage::defaultValues()
-        virtual std::vector<Variant> defaultValues() const;
+        std::vector<Variant> defaultValues() const override;
         /*! \copydoc gmx::AbstractOptionStorage::defaultValuesAsStrings()
          *
          * OptionStorageTemplate implements handling of defaultValueIfSet()
@@ -110,7 +110,7 @@ class OptionStorageTemplate : public AbstractOptionStorage
          * Derived classes must implement formatSingleValue() to provide the
          * actual formatting for a value of type \p T.
          */
-        virtual std::vector<std::string> defaultValuesAsStrings() const;
+        std::vector<std::string> defaultValuesAsStrings() const override;
 
     protected:
         //! Smart pointer for managing the final storage interface.
@@ -141,7 +141,7 @@ class OptionStorageTemplate : public AbstractOptionStorage
                               StorePointer          store);
 
         //! \copydoc gmx::AbstractOptionStorage::clearSet()
-        virtual void clearSet();
+        void clearSet() override;
         /*! \copydoc gmx::AbstractOptionStorage::convertValue()
          *
          * Derived classes should call addValue() after they have converted
@@ -151,7 +151,7 @@ class OptionStorageTemplate : public AbstractOptionStorage
          * should be considered whether the implementation can be made strongly
          * exception safe.
          */
-        virtual void convertValue(const Variant &value) = 0;
+        void convertValue(const Variant &value) override = 0;
         /*! \brief
          * Processes values for a set after all have been converted.
          *
@@ -177,12 +177,12 @@ class OptionStorageTemplate : public AbstractOptionStorage
          * override that method instead of this one if set value processing is
          * necessary.
          */
-        virtual void processSet();
+        void processSet() override;
         /*! \copydoc gmx::AbstractOptionStorage::processAll()
          *
          * The implementation in OptionStorageTemplate does nothing.
          */
-        virtual void processAll()
+        void processAll() override
         {
         }
         /*! \brief
@@ -327,8 +327,8 @@ class OptionStorageTemplateSimple : public OptionStorageTemplate<T>
         {
         }
 
-        virtual std::vector<Variant>
-        normalizeValues(const std::vector<Variant> &values) const
+        std::vector<Variant>
+        normalizeValues(const std::vector<Variant> &values) const override
         {
             const_cast<MyBase *>(this)->ensureConverterInitialized();
             std::vector<Variant> result;
@@ -373,7 +373,7 @@ class OptionStorageTemplateSimple : public OptionStorageTemplate<T>
         }
 
     private:
-        virtual void convertValue(const Variant &variant)
+        void convertValue(const Variant &variant) override
         {
             ensureConverterInitialized();
             this->addValue(processValue(converter_.convert(variant)));
index 0f1adf33dfc1e1bca2247b0fdfd5c7366ab1abb1..2b224449ba17ade73a7432789ab11bd96e8bb3bf 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2014,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2014,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -93,16 +93,16 @@ template <class InfoType>
 class OptionsTypeVisitor : public OptionsVisitor
 {
     public:
-        virtual ~OptionsTypeVisitor() {}
+        ~OptionsTypeVisitor() override {}
 
-        virtual void visitSection(const OptionSectionInfo &section) = 0;
+        void visitSection(const OptionSectionInfo &section) override = 0;
         /*! \brief
          * Called for each option of type \p InfoType.
          */
         virtual void visitOptionType(const InfoType &option) = 0;
 
     private:
-        virtual void visitOption(const OptionInfo &option)
+        void visitOption(const OptionInfo &option) override
         {
             const InfoType *subtype = option.toType<InfoType>();
             if (subtype != NULL)
@@ -202,16 +202,16 @@ template <class InfoType>
 class OptionsModifyingTypeVisitor : public OptionsModifyingVisitor
 {
     public:
-        virtual ~OptionsModifyingTypeVisitor() {}
+        ~OptionsModifyingTypeVisitor() override {}
 
-        virtual void visitSection(OptionSectionInfo *section) = 0;
+        void visitSection(OptionSectionInfo *section) override = 0;
         /*! \brief
          * Called for each option of type \p InfoType.
          */
         virtual void visitOptionType(InfoType *option) = 0;
 
     private:
-        virtual void visitOption(OptionInfo *option)
+        void visitOption(OptionInfo *option) override
         {
             InfoType *subtype = option->toType<InfoType>();
             if (subtype != nullptr)
index 6d2a97384d34a1db764c4590589f34477b5674fb..de1cbf6631e84178d06d8bc754e0add514078511 100644 (file)
@@ -91,7 +91,7 @@ class RepeatingOptionSection : public AbstractOptionSection
         }
 
     private:
-        virtual std::unique_ptr<IOptionSectionStorage> createStorage() const;
+        std::unique_ptr<IOptionSectionStorage> createStorage() const override;
 
         std::vector<T> *values_;
 
@@ -115,15 +115,15 @@ class RepeatingOptionSectionStorage : public IOptionSectionStorage
         {
         }
 
-        virtual void initStorage()
+        void initStorage() override
         {
             defaultValues_ = currentData_;
         }
-        virtual void startSection()
+        void startSection() override
         {
             resetSection();
         }
-        virtual void finishSection()
+        void finishSection() override
         {
             store_->append(currentData_);
             resetSection();
index 1cfab3a8a6eb4de64dad1519d15bc823744da804..336075277337d4cbd74b1bda21434db934499c30 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2016, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -103,20 +103,20 @@ class MockOptionStorage : public gmx::OptionStorageTemplate<std::string>
         using MyBase::addValue;
         using MyBase::commitValues;
 
-        virtual gmx::OptionInfo &optionInfo() { return info_; }
+        gmx::OptionInfo &optionInfo() override { return info_; }
         // These are not used.
-        virtual std::string typeString() const { return "mock"; }
-        virtual std::string formatSingleValue(const std::string & /*value*/) const
+        std::string typeString() const override { return "mock"; }
+        std::string formatSingleValue(const std::string & /*value*/) const override
         {
             return "";
         }
-        virtual std::vector<gmx::Variant>
-        normalizeValues(const std::vector<gmx::Variant> &values) const
+        std::vector<gmx::Variant>
+        normalizeValues(const std::vector<gmx::Variant> &values) const override
         {
             return values;
         }
 
-        virtual void convertValue(const gmx::Variant &value)
+        void convertValue(const gmx::Variant &value) override
         {
             convertValue(value.cast<std::string>());
         }
@@ -147,8 +147,8 @@ class MockOption : public gmx::OptionTemplate<std::string, MockOption>
         }
 
     private:
-        virtual gmx::AbstractOptionStorage *createStorage(
-            const gmx::OptionManagerContainer & /*managers*/) const
+        gmx::AbstractOptionStorage *createStorage(
+            const gmx::OptionManagerContainer & /*managers*/) const override
         {
             return new MockOptionStorage(*this);
         }
index c5557c920ae1a1e08a19c527112665466ae409e1..92291120e1e3dbd6297b0e7f85a79d814a28ffcf 100644 (file)
@@ -192,14 +192,14 @@ class TimeOptionScaler : public OptionsModifyingTypeVisitor<FloatingPointOptionI
         //! Initializes a scaler with the given factor.
         explicit TimeOptionScaler(double factor) : factor_(factor) {}
 
-        void visitSection(OptionSectionInfo *section)
+        void visitSection(OptionSectionInfo *section) override
         {
             OptionsModifyingIterator iterator(section);
             iterator.acceptSections(this);
             iterator.acceptOptions(this);
         }
 
-        void visitOptionType(FloatingPointOptionInfo *option)
+        void visitOptionType(FloatingPointOptionInfo *option) override
         {
             if (option->isTime())
             {
index 78bcaf5851af9171bd710f5d6952b97a51d5da9c..9e23bdea8bfc5bcd55a78693c8a98c66cd9c6850 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -183,9 +183,9 @@ class TimeUnitBehavior : public IOptionsBehavior
         void addTimeUnitOption(IOptionsContainer *options, const char *name);
 
         // From IOptionsBehavior
-        virtual void initBehavior(Options * /*options*/) {}
-        virtual void optionsFinishing(Options *options);
-        virtual void optionsFinished() {}
+        void initBehavior(Options * /*options*/) override {}
+        void optionsFinishing(Options *options) override;
+        void optionsFinished() override {}
 
     private:
         TimeUnit         timeUnit_;
index 9edaaa8a5b1d25b3d1d4731afa008e1d7aa40e87..bacc788d34fa4892bf268da062b522443938c24d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -179,7 +179,7 @@ class TreeCheckHelper : private OptionsVisitor
         }
 
     private:
-        virtual void visitSection(const OptionSectionInfo &section)
+        void visitSection(const OptionSectionInfo &section) override
         {
             const std::string &name = section.name();
             if (currentObject_->keyExists(name))
@@ -196,7 +196,7 @@ class TreeCheckHelper : private OptionsVisitor
                 currentKnownNames_ = parentKnownNames;
             }
         }
-        virtual void visitOption(const OptionInfo &option)
+        void visitOption(const OptionInfo &option) override
         {
             const std::string &name = option.name();
             if (currentObject_->keyExists(name))
@@ -231,7 +231,7 @@ class TreeAdjustHelper : private OptionsVisitor
         }
 
     private:
-        virtual void visitSection(const OptionSectionInfo &section)
+        void visitSection(const OptionSectionInfo &section) override
         {
             const std::string &name          = section.name();
             auto               parentBuilder = currentObjectBuilder_;
@@ -245,7 +245,7 @@ class TreeAdjustHelper : private OptionsVisitor
             currentSourceObject_  = parentObject;
             currentObjectBuilder_ = parentBuilder;
         }
-        virtual void visitOption(const OptionInfo &option)
+        void visitOption(const OptionInfo &option) override
         {
             const std::string &name = option.name();
             if (currentSourceObject_ == nullptr || !currentSourceObject_->keyExists(name))
index e78c77ede3d28b4a253a64ae2c2c20b65c7100bf..9ba42e58687956a405dfad59ba473ae45772f663 100644 (file)
@@ -59,9 +59,9 @@ class OptionValueStorePlain : public IOptionValueStore<T>
         {
         }
 
-        virtual int valueCount() { return count_; }
-        virtual ArrayRef<T> values() { return arrayRefFromArray(store_, count_); }
-        virtual void clear()
+        int valueCount() override { return count_; }
+        ArrayRef<T> values() override { return arrayRefFromArray(store_, count_); }
+        void clear() override
         {
             count_ = 0;
             if (storeCount_ != nullptr)
@@ -69,10 +69,10 @@ class OptionValueStorePlain : public IOptionValueStore<T>
                 *storeCount_ = count_;
             }
         }
-        virtual void reserve(size_t /*count*/)
+        void reserve(size_t /*count*/) override
         {
         }
-        virtual void append(const T &value)
+        void append(const T &value) override
         {
             store_[count_] = value;
             ++count_;
@@ -94,14 +94,14 @@ class OptionValueStoreVector : public IOptionValueStore<T>
     public:
         explicit OptionValueStoreVector(std::vector<T> *store) : store_(store) {}
 
-        virtual int valueCount() { return static_cast<int>(store_->size()); }
-        virtual ArrayRef<T> values() { return *store_; }
-        virtual void clear() { store_->clear(); }
-        virtual void reserve(size_t count)
+        int valueCount() override { return static_cast<int>(store_->size()); }
+        ArrayRef<T> values() override { return *store_; }
+        void clear() override { store_->clear(); }
+        void reserve(size_t count) override
         {
             store_->reserve(store_->size() + count);
         }
-        virtual void append(const T &value)
+        void append(const T &value) override
         {
             store_->push_back(value);
         }
@@ -119,23 +119,23 @@ class OptionValueStoreVector<bool> : public IOptionValueStore<bool>
         {
         }
 
-        virtual int valueCount() { return static_cast<int>(store_->size()); }
-        virtual ArrayRef<bool> values()
+        int valueCount() override { return static_cast<int>(store_->size()); }
+        ArrayRef<bool> values() override
         {
             return arrayRefFromArray(reinterpret_cast<bool *>(boolStore_.data()),
                                      boolStore_.size());
         }
-        virtual void clear()
+        void clear() override
         {
             boolStore_.clear();
             store_->clear();
         }
-        virtual void reserve(size_t count)
+        void reserve(size_t count) override
         {
             boolStore_.reserve(boolStore_.size() + count);
             store_->reserve(store_->size() + count);
         }
-        virtual void append(const bool &value)
+        void append(const bool &value) override
         {
             boolStore_.push_back({value});
             store_->push_back(value);
@@ -166,11 +166,11 @@ class OptionValueStoreNull : public IOptionValueStore<T>
     public:
         OptionValueStoreNull() : store_(&vector_) {}
 
-        virtual int valueCount() { return store_.valueCount(); }
-        virtual ArrayRef<T> values() { return store_.values(); }
-        virtual void clear() { store_.clear(); }
-        virtual void reserve(size_t count) { store_.reserve(count); }
-        virtual void append(const T &value) { store_.append(value); }
+        int valueCount() override { return store_.valueCount(); }
+        ArrayRef<T> values() override { return store_.values(); }
+        void clear() override { store_.clear(); }
+        void reserve(size_t count) override { store_.reserve(count); }
+        void append(const T &value) override { store_.append(value); }
 
     private:
         std::vector<T>            vector_;
index 369d6256dbb50bf3c15f2a17fe1676467fc081a1..df0612cbc810b15372414640d3dbac490415d83d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -76,8 +76,8 @@ class SelectionFileOption : public AbstractOption
         explicit SelectionFileOption(const char *name);
 
     private:
-        virtual AbstractOptionStorage *createStorage(
-            const OptionManagerContainer &managers) const;
+        AbstractOptionStorage *createStorage(
+            const OptionManagerContainer &managers) const override;
 };
 
 /*! \libinternal \brief
index 2d45bf55f1da3a1c1993ea68b29672128df33c15..5fe30043f99a8bfbd63db06f1b9cdf82ad983780 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2016, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -68,19 +68,19 @@ class SelectionFileOptionStorage : public AbstractOptionStorage
         SelectionFileOptionStorage(const SelectionFileOption &settings,
                                    SelectionOptionManager    *manager);
 
-        virtual OptionInfo &optionInfo() { return info_; }
-        virtual std::string typeString() const { return "file"; }
-        virtual int valueCount() const { return 0; }
-        virtual std::vector<Variant> defaultValues() const { return {}; }
-        virtual std::vector<std::string> defaultValuesAsStrings() const { return {}; }
-        virtual std::vector<Variant>
-        normalizeValues(const std::vector<Variant> &values) const { return values; }
+        OptionInfo &optionInfo() override { return info_; }
+        std::string typeString() const override { return "file"; }
+        int valueCount() const override { return 0; }
+        std::vector<Variant> defaultValues() const override { return {}; }
+        std::vector<std::string> defaultValuesAsStrings() const override { return {}; }
+        std::vector<Variant>
+        normalizeValues(const std::vector<Variant> &values) const override { return values; }
 
     private:
-        virtual void clearSet();
-        virtual void convertValue(const Variant &value);
-        virtual void processSet();
-        virtual void processAll() {}
+        void clearSet() override;
+        void convertValue(const Variant &value) override;
+        void processSet() override;
+        void processAll() override {}
 
         SelectionFileOptionInfo  info_;
         SelectionOptionManager  &manager_;
index 2755f68c6f7e84b16bc5ca270d0d33286c802af4..531f8d72a67d744478cf8584adbf1f3526ab20d2 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -157,8 +157,8 @@ class SelectionOption : public OptionTemplate<Selection, SelectionOption>
         using MyBase::defaultValue;
         using MyBase::defaultValueIfSet;
 
-        virtual AbstractOptionStorage *createStorage(
-            const OptionManagerContainer &managers) const;
+        AbstractOptionStorage *createStorage(
+            const OptionManagerContainer &managers) const override;
 
         const char             *defaultText_;
         SelectionFlags          selectionFlags_;
index 1768a01b46e964dad1c4ca01de75b50cc93353c6..2e58c6993007e9609e453837aab5c674a608e86a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -156,7 +156,7 @@ class SelectionOptionBehavior : public IOptionsBehavior
          */
         SelectionOptionBehavior(SelectionCollection *selections,
                                 ITopologyProvider   *topologyProvider);
-        ~SelectionOptionBehavior();
+        ~SelectionOptionBehavior() override;
 
         /*! \brief
          * Add common options for controlling selections.
@@ -167,9 +167,9 @@ class SelectionOptionBehavior : public IOptionsBehavior
         void initOptions(IOptionsContainer *options);
 
         // From IOptionsBehavior
-        virtual void initBehavior(Options *options);
-        virtual void optionsFinishing(Options * /*options*/) {}
-        virtual void optionsFinished();
+        void initBehavior(Options *options) override;
+        void optionsFinishing(Options * /*options*/) override {}
+        void optionsFinished() override;
 
     private:
         class Impl;
index dc2dbf36b35600c787ca39d60bc253c2597e4647..06b1d35400a120939f81fc6c2442a43ca55908da 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -87,7 +87,7 @@ class SelectionOptionManager : public IOptionManager
          * \throws  std::bad_alloc if out of memory.
          */
         explicit SelectionOptionManager(SelectionCollection *selections);
-        virtual ~SelectionOptionManager();
+        ~SelectionOptionManager() override;
 
         /*! \brief
          * Adds a selection option to be managed.
index 795bdffa4c90cc53ecd627ab2ebcd2d2122b1e9b..b6bdcc2f5d60c5e51706f2dcc2d621e5ad6c73f0 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -74,11 +74,11 @@ class SelectionOptionStorage : public OptionStorageTemplate<Selection>
         SelectionOptionStorage(const SelectionOption  &settings,
                                SelectionOptionManager *manager);
 
-        virtual OptionInfo &optionInfo() { return info_; }
-        virtual std::string typeString() const { return "selection"; }
-        virtual std::string formatSingleValue(const Selection &value) const;
-        virtual std::vector<Variant>
-        normalizeValues(const std::vector<Variant> &values) const;
+        OptionInfo &optionInfo() override { return info_; }
+        std::string typeString() const override { return "selection"; }
+        std::string formatSingleValue(const Selection &value) const override;
+        std::vector<Variant>
+        normalizeValues(const std::vector<Variant> &values) const override;
 
         /*! \brief
          * Adds selections to the storage.
@@ -128,9 +128,9 @@ class SelectionOptionStorage : public OptionStorageTemplate<Selection>
         void setSelectionFlag(SelectionFlag flag, bool bSet);
 
     private:
-        virtual void convertValue(const Variant &value);
-        virtual void processSetValues(ValueList *values);
-        virtual void processAll();
+        void convertValue(const Variant &value) override;
+        void processSetValues(ValueList *values) override;
+        void processAll() override;
 
         SelectionOptionInfo     info_;
         SelectionOptionManager &manager_;
index d807f042f4c7048eeed5d86b1b55b157eda3b07b..c99411c744e9048f11e3e16d5e9908a89e619ce9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -552,17 +552,17 @@ class KeywordDetailsHelpTopic : public AbstractSimpleHelpTopic
         {
         }
 
-        virtual const char *name() const
+        const char *name() const override
         {
             return name_.c_str();
         }
-        virtual const char *title() const
+        const char *title() const override
         {
             return method_.help.helpTitle;
         }
 
     protected:
-        virtual std::string helpText() const
+        std::string helpText() const override
         {
             return joinStrings(method_.help.help,
                                method_.help.help + method_.help.nlhelp, "\n");
@@ -585,7 +585,7 @@ class KeywordsHelpTopic : public CompositeHelpTopic<KeywordsHelpText>
     public:
         KeywordsHelpTopic();
 
-        virtual void writeHelp(const HelpWriterContext &context) const;
+        void writeHelp(const HelpWriterContext &context) const override;
 
     private:
         /*! \brief
index c91519e34377a3b32a874d153c783025a762f19e..482d204a9d5910554af097cd704b08f6b757974e 100644 (file)
@@ -83,7 +83,7 @@ class IndexBlockTest : public ::testing::Test
 {
     public:
         IndexBlockTest();
-        ~IndexBlockTest();
+        ~IndexBlockTest() override;
 
         void setGroup(int count, const int atoms[]);
         template <int count>
@@ -373,7 +373,7 @@ class IndexMapTest : public ::testing::Test
 {
     public:
         IndexMapTest();
-        ~IndexMapTest();
+        ~IndexMapTest() override;
 
         void testInit(int atomCount, const int atoms[], e_index_t type);
         void testUpdate(int atomCount, const int atoms[], bool bMaskOnly,
index a7fb303f1dd38dfccd460ac97e9965689792ea2f..5bb798e04e50e2eca46cdaaea086927164e15545 100644 (file)
@@ -71,7 +71,7 @@ class PositionCalculationTest : public ::testing::Test
 {
     public:
         PositionCalculationTest();
-        ~PositionCalculationTest();
+        ~PositionCalculationTest() override;
 
         void generateCoordinates();
 
index f930a8af4e9e3ea97469794c74943ebbdc6c1938..ba13fc5288a6be9dabb609f498f628376d4357a3 100644 (file)
@@ -78,7 +78,7 @@ class SelectionCollectionTest : public ::testing::Test
         static int               s_debugLevel;
 
         SelectionCollectionTest();
-        ~SelectionCollectionTest();
+        ~SelectionCollectionTest() override;
 
         void setAtomCount(int natoms)
         {
index 716368b9747e13f57e55187e20df19ed16789fc9..18faf03b4b6fd7197f8b660071a5882a5251a2a5 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -242,7 +242,7 @@ class TrajectoryAnalysisModuleDataBasic : public TrajectoryAnalysisModuleData
                                           const AnalysisDataParallelOptions &opt,
                                           const SelectionCollection         &selections);
 
-        virtual void finish();
+        void finish() override;
 };
 
 TrajectoryAnalysisModuleDataBasic::TrajectoryAnalysisModuleDataBasic(
index 4b93e7c42fca77e5cd39bdda78b7f55139b59475..733ebdd2c35b6f74420a0ea9c2fd0a0fe3860c32 100644 (file)
@@ -79,11 +79,11 @@ class RunnerModule : public ICommandLineOptionsModule
         {
         }
 
-        virtual void init(CommandLineModuleSettings * /*settings*/) {}
-        virtual void initOptions(IOptionsContainer                 *options,
-                                 ICommandLineOptionsModuleSettings *settings);
-        virtual void optionsFinished();
-        virtual int run();
+        void init(CommandLineModuleSettings * /*settings*/) override {}
+        void initOptions(IOptionsContainer                 *options,
+                         ICommandLineOptionsModuleSettings *settings) override;
+        void optionsFinished() override;
+        int run() override;
 
         TrajectoryAnalysisModulePointer module_;
         TrajectoryAnalysisSettings      settings_;
index 6d2ebb181cff58411fbb3aac4f836af2eac030cd..74ecf2df9c134e76a2371d3887fb3cb92295302e 100644 (file)
@@ -272,17 +272,17 @@ class Angle : public TrajectoryAnalysisModule
     public:
         Angle();
 
-        virtual void initOptions(IOptionsContainer          *options,
-                                 TrajectoryAnalysisSettings *settings);
-        virtual void optionsFinished(TrajectoryAnalysisSettings *settings);
-        virtual void initAnalysis(const TrajectoryAnalysisSettings &settings,
-                                  const TopologyInformation        &top);
+        void initOptions(IOptionsContainer          *options,
+                         TrajectoryAnalysisSettings *settings) override;
+        void optionsFinished(TrajectoryAnalysisSettings *settings) override;
+        void initAnalysis(const TrajectoryAnalysisSettings &settings,
+                          const TopologyInformation        &top) override;
 
-        virtual void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
-                                  TrajectoryAnalysisModuleData *pdata);
+        void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
+                          TrajectoryAnalysisModuleData *pdata) override;
 
-        virtual void finishAnalysis(int nframes);
-        virtual void writeOutput();
+        void finishAnalysis(int nframes) override;
+        void writeOutput() override;
 
     private:
         void initFromSelections(const SelectionList &sel1,
index aab79943c2721c6f0711500e7a7bba32367d66c9..6ad5ec183fb30d0e825d2e9381e0b179f21ed593 100644 (file)
@@ -77,16 +77,16 @@ class Distance : public TrajectoryAnalysisModule
     public:
         Distance();
 
-        virtual void initOptions(IOptionsContainer          *options,
-                                 TrajectoryAnalysisSettings *settings);
-        virtual void initAnalysis(const TrajectoryAnalysisSettings &settings,
-                                  const TopologyInformation        &top);
+        void initOptions(IOptionsContainer          *options,
+                         TrajectoryAnalysisSettings *settings) override;
+        void initAnalysis(const TrajectoryAnalysisSettings &settings,
+                          const TopologyInformation        &top) override;
 
-        virtual void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
-                                  TrajectoryAnalysisModuleData *pdata);
+        void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
+                          TrajectoryAnalysisModuleData *pdata) override;
 
-        virtual void finishAnalysis(int nframes);
-        virtual void writeOutput();
+        void finishAnalysis(int nframes) override;
+        void writeOutput() override;
 
     private:
         SelectionList                            sel_;
index c6d9923184e406ceb201e26622d3a06ece45aed3..0093c999a92388c0076b1fb045214f0aada0582b 100644 (file)
@@ -90,16 +90,16 @@ class FreeVolume : public TrajectoryAnalysisModule
 {
     public:
         FreeVolume();
-        virtual ~FreeVolume() {}
-
-        virtual void initOptions(IOptionsContainer          *options,
-                                 TrajectoryAnalysisSettings *settings);
-        virtual void initAnalysis(const TrajectoryAnalysisSettings &settings,
-                                  const TopologyInformation        &top);
-        virtual void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
-                                  TrajectoryAnalysisModuleData *pdata);
-        virtual void finishAnalysis(int nframes);
-        virtual void writeOutput();
+        ~FreeVolume() override {}
+
+        void initOptions(IOptionsContainer          *options,
+                         TrajectoryAnalysisSettings *settings) override;
+        void initAnalysis(const TrajectoryAnalysisSettings &settings,
+                          const TopologyInformation        &top) override;
+        void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
+                          TrajectoryAnalysisModuleData *pdata) override;
+        void finishAnalysis(int nframes) override;
+        void writeOutput() override;
 
     private:
         std::string                       fnFreevol_;
index 843e36655bc194955223092affae27203d664596..438111e0c01a4757fe9d72fc2b97e59d7f95a3f8 100644 (file)
@@ -106,19 +106,19 @@ class PairDistance : public TrajectoryAnalysisModule
     public:
         PairDistance();
 
-        virtual void initOptions(IOptionsContainer          *options,
-                                 TrajectoryAnalysisSettings *settings);
-        virtual void initAnalysis(const TrajectoryAnalysisSettings &settings,
-                                  const TopologyInformation        &top);
+        void initOptions(IOptionsContainer          *options,
+                         TrajectoryAnalysisSettings *settings) override;
+        void initAnalysis(const TrajectoryAnalysisSettings &settings,
+                          const TopologyInformation        &top) override;
 
-        virtual TrajectoryAnalysisModuleDataPointer startFrames(
+        TrajectoryAnalysisModuleDataPointer startFrames(
             const AnalysisDataParallelOptions &opt,
-            const SelectionCollection         &selections);
-        virtual void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
-                                  TrajectoryAnalysisModuleData *pdata);
+            const SelectionCollection         &selections) override;
+        void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
+                          TrajectoryAnalysisModuleData *pdata) override;
 
-        virtual void finishAnalysis(int nframes);
-        virtual void writeOutput();
+        void finishAnalysis(int nframes) override;
+        void writeOutput() override;
 
     private:
         /*! \brief
@@ -338,7 +338,7 @@ class PairDistanceModuleData : public TrajectoryAnalysisModuleData
             }
         }
 
-        virtual void finish() { finishDataHandles(); }
+        void finish() override { finishDataHandles(); }
 
         /*! \brief
          * Computes the number of positions in each group in \p refSel
index 45079fc98f1fd9c0657d87b4a480b21c664f9733..e4fb8fef6ed27a9cd40da077c36ea073b3a2fad1 100644 (file)
@@ -117,22 +117,22 @@ class Rdf : public TrajectoryAnalysisModule
     public:
         Rdf();
 
-        virtual void initOptions(IOptionsContainer          *options,
-                                 TrajectoryAnalysisSettings *settings);
-        virtual void optionsFinished(TrajectoryAnalysisSettings *settings);
-        virtual void initAnalysis(const TrajectoryAnalysisSettings &settings,
-                                  const TopologyInformation        &top);
-        virtual void initAfterFirstFrame(const TrajectoryAnalysisSettings &settings,
-                                         const t_trxframe                 &fr);
-
-        virtual TrajectoryAnalysisModuleDataPointer startFrames(
+        void initOptions(IOptionsContainer          *options,
+                         TrajectoryAnalysisSettings *settings) override;
+        void optionsFinished(TrajectoryAnalysisSettings *settings) override;
+        void initAnalysis(const TrajectoryAnalysisSettings &settings,
+                          const TopologyInformation        &top) override;
+        void initAfterFirstFrame(const TrajectoryAnalysisSettings &settings,
+                                 const t_trxframe                 &fr) override;
+
+        TrajectoryAnalysisModuleDataPointer startFrames(
             const AnalysisDataParallelOptions &opt,
-            const SelectionCollection         &selections);
-        virtual void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
-                                  TrajectoryAnalysisModuleData *pdata);
+            const SelectionCollection         &selections) override;
+        void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
+                          TrajectoryAnalysisModuleData *pdata) override;
 
-        virtual void finishAnalysis(int nframes);
-        virtual void writeOutput();
+        void finishAnalysis(int nframes) override;
+        void writeOutput() override;
 
     private:
         std::string                               fnRdf_;
@@ -438,7 +438,7 @@ class RdfModuleData : public TrajectoryAnalysisModuleData
             surfaceDist2_.resize(surfaceGroupCount);
         }
 
-        virtual void finish() { finishDataHandles(); }
+        void finish() override { finishDataHandles(); }
 
         /*! \brief
          * Minimum distance to each surface group.
index 41ce97d2f2f6a801bc1ddf15961215da7319c2a8..23547c7a7575ba572a92c041a5d28542aadde0f0 100644 (file)
@@ -288,19 +288,19 @@ class Sasa : public TrajectoryAnalysisModule
     public:
         Sasa();
 
-        virtual void initOptions(IOptionsContainer          *options,
-                                 TrajectoryAnalysisSettings *settings);
-        virtual void initAnalysis(const TrajectoryAnalysisSettings &settings,
-                                  const TopologyInformation        &top);
+        void initOptions(IOptionsContainer          *options,
+                         TrajectoryAnalysisSettings *settings) override;
+        void initAnalysis(const TrajectoryAnalysisSettings &settings,
+                          const TopologyInformation        &top) override;
 
-        virtual TrajectoryAnalysisModuleDataPointer startFrames(
+        TrajectoryAnalysisModuleDataPointer startFrames(
             const AnalysisDataParallelOptions &opt,
-            const SelectionCollection         &selections);
-        virtual void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
-                                  TrajectoryAnalysisModuleData *pdata);
+            const SelectionCollection         &selections) override;
+        void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
+                          TrajectoryAnalysisModuleData *pdata) override;
 
-        virtual void finishAnalysis(int nframes);
-        virtual void writeOutput();
+        void finishAnalysis(int nframes) override;
+        void writeOutput() override;
 
     private:
         /*! \brief
@@ -764,7 +764,7 @@ class SasaModuleData : public TrajectoryAnalysisModuleData
             res_a_.resize(residueCount);
         }
 
-        virtual void finish() { finishDataHandles(); }
+        void finish() override { finishDataHandles(); }
 
         //! Indices of the calculation selection positions selected for the frame.
         std::vector<int>        index_;
index 15810ffa18251dcef9150a08a2d69644553732e9..4ab86a7b1135be7ab189f9408dfe950a26d72285 100644 (file)
@@ -93,7 +93,7 @@ class IndexFileWriterModule : public AnalysisDataModuleSerial
 {
     public:
         IndexFileWriterModule();
-        virtual ~IndexFileWriterModule();
+        ~IndexFileWriterModule() override;
 
         //! Sets the file name to write the index file to.
         void setFileName(const std::string &fnm);
@@ -104,13 +104,13 @@ class IndexFileWriterModule : public AnalysisDataModuleSerial
          */
         void addGroup(const std::string &name, bool bDynamic);
 
-        virtual int flags() const;
+        int flags() const override;
 
-        virtual void dataStarted(AbstractAnalysisData *data);
-        virtual void frameStarted(const AnalysisDataFrameHeader &header);
-        virtual void pointsAdded(const AnalysisDataPointSetRef &points);
-        virtual void frameFinished(const AnalysisDataFrameHeader &header);
-        virtual void dataFinished();
+        void dataStarted(AbstractAnalysisData *data) override;
+        void frameStarted(const AnalysisDataFrameHeader &header) override;
+        void pointsAdded(const AnalysisDataPointSetRef &points) override;
+        void frameFinished(const AnalysisDataFrameHeader &header) override;
+        void dataFinished() override;
 
     private:
         void closeFile();
@@ -280,17 +280,17 @@ class Select : public TrajectoryAnalysisModule
     public:
         Select();
 
-        virtual void initOptions(IOptionsContainer          *options,
-                                 TrajectoryAnalysisSettings *settings);
-        virtual void optionsFinished(TrajectoryAnalysisSettings *settings);
-        virtual void initAnalysis(const TrajectoryAnalysisSettings &settings,
-                                  const TopologyInformation        &top);
+        void initOptions(IOptionsContainer          *options,
+                         TrajectoryAnalysisSettings *settings) override;
+        void optionsFinished(TrajectoryAnalysisSettings *settings) override;
+        void initAnalysis(const TrajectoryAnalysisSettings &settings,
+                          const TopologyInformation        &top) override;
 
-        virtual void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
-                                  TrajectoryAnalysisModuleData *pdata);
+        void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
+                          TrajectoryAnalysisModuleData *pdata) override;
 
-        virtual void finishAnalysis(int nframes);
-        virtual void writeOutput();
+        void finishAnalysis(int nframes) override;
+        void writeOutput() override;
 
     private:
         SelectionList                       sel_;
index 3b4ba9f465e77674d6fb0460a2f00107400c497e..71351caeb9bca62523b435a7aadb9f05e9dd36d9 100644 (file)
@@ -74,17 +74,17 @@ class Trajectory : public TrajectoryAnalysisModule
     public:
         Trajectory();
 
-        virtual void initOptions(IOptionsContainer          *options,
-                                 TrajectoryAnalysisSettings *settings);
-        virtual void optionsFinished(TrajectoryAnalysisSettings *settings);
-        virtual void initAnalysis(const TrajectoryAnalysisSettings &settings,
-                                  const TopologyInformation        &top);
+        void initOptions(IOptionsContainer          *options,
+                         TrajectoryAnalysisSettings *settings) override;
+        void optionsFinished(TrajectoryAnalysisSettings *settings) override;
+        void initAnalysis(const TrajectoryAnalysisSettings &settings,
+                          const TopologyInformation        &top) override;
 
-        virtual void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
-                                  TrajectoryAnalysisModuleData *pdata);
+        void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
+                          TrajectoryAnalysisModuleData *pdata) override;
 
-        virtual void finishAnalysis(int nframes);
-        virtual void writeOutput();
+        void finishAnalysis(int nframes) override;
+        void writeOutput() override;
 
     private:
         SelectionList                       sel_;
index 1b7e9a5ef75a6918e7ddcd5ef76c045978d78633..e7e0f275dcc01d4c960d6f4dff5c3298b1024258 100644 (file)
@@ -80,7 +80,7 @@ class TrajectoryAnalysisRunnerCommon::Impl : public ITopologyProvider
 {
     public:
         explicit Impl(TrajectoryAnalysisSettings *settings);
-        ~Impl();
+        ~Impl() override;
 
         bool hasTrajectory() const { return !trjfile_.empty(); }
 
@@ -90,12 +90,12 @@ class TrajectoryAnalysisRunnerCommon::Impl : public ITopologyProvider
         void finishTrajectory();
 
         // From ITopologyProvider
-        virtual gmx_mtop_t *getTopology(bool required)
+        gmx_mtop_t *getTopology(bool required) override
         {
             initTopology(required);
             return topInfo_.mtop_.get();
         }
-        virtual int getAtomCount()
+        int getAtomCount() override
         {
             if (!topInfo_.hasTopology())
             {
index f0e9ab6e37c3bbdd9fe19a9e075295acabc212f8..10e5f7287522b1ee96fb9f3ec94d2348045517dc 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -93,7 +93,7 @@ class AbstractTrajectoryAnalysisModuleTestFixture : public CommandLineTestBase
 {
     public:
         AbstractTrajectoryAnalysisModuleTestFixture();
-        virtual ~AbstractTrajectoryAnalysisModuleTestFixture();
+        ~AbstractTrajectoryAnalysisModuleTestFixture() override;
 
         /*! \brief
          * Sets the topology file to use for the test.
@@ -199,7 +199,7 @@ class TrajectoryAnalysisModuleTestFixture
     : public AbstractTrajectoryAnalysisModuleTestFixture
 {
     protected:
-        virtual TrajectoryAnalysisModulePointer createModule()
+        TrajectoryAnalysisModulePointer createModule() override
         {
             return ModuleInfo::create();
         }
index 80e421b04afb8799cde5c1989a0e911260762f15..f1473e479ffa4dd018080c7007a3654d14db3ac4 100644 (file)
@@ -74,7 +74,7 @@ class SurfaceAreaTest : public ::testing::Test
               atomArea_(nullptr), dotCount_(0), dots_(nullptr)
         {
         }
-        ~SurfaceAreaTest()
+        ~SurfaceAreaTest() override
         {
             sfree(atomArea_);
             sfree(dots_);
index 51e748ef3c9704786100a977604e79ad8392962e..b1841dcf954bbf68cfe40a387a59b7b024bffdf3 100644 (file)
@@ -57,18 +57,18 @@ class SelectionTester : public TrajectoryAnalysisModule
 {
     public:
         SelectionTester();
-        virtual ~SelectionTester();
+        ~SelectionTester() override;
 
-        virtual void initOptions(IOptionsContainer          *options,
-                                 TrajectoryAnalysisSettings *settings);
-        virtual void initAnalysis(const TrajectoryAnalysisSettings &settings,
-                                  const TopologyInformation        &top);
+        void initOptions(IOptionsContainer          *options,
+                         TrajectoryAnalysisSettings *settings) override;
+        void initAnalysis(const TrajectoryAnalysisSettings &settings,
+                          const TopologyInformation        &top) override;
 
-        virtual void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
-                                  TrajectoryAnalysisModuleData *pdata);
+        void analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc,
+                          TrajectoryAnalysisModuleData *pdata) override;
 
-        virtual void finishAnalysis(int nframes);
-        virtual void writeOutput();
+        void finishAnalysis(int nframes) override;
+        void writeOutput() override;
 
     private:
         void printSelections();
index 19886c1f4c40410bb97160dcde9b48d550c5401f..6ef691a2ff855ff4cfa034fa61eca39aef3e9d76 100644 (file)
@@ -330,12 +330,12 @@ class MessageWriterFileNoThrow : public IMessageWriter
         //! Initializes a writer that writes to the given file handle.
         explicit MessageWriterFileNoThrow(FILE *fp) : fp_(fp) {}
 
-        virtual void writeLine(const char *text, int indent)
+        void writeLine(const char *text, int indent) override
         {
             internal::printFatalErrorMessageLine(fp_, text, indent);
         }
-        virtual void writeErrNoInfo(int errorNumber, const char *funcName,
-                                    int indent)
+        void writeErrNoInfo(int errorNumber, const char *funcName,
+                            int indent) override
         {
             std::fprintf(fp_, "%*sReason: %s\n", indent, "",
                          std::strerror(errorNumber));
@@ -361,13 +361,13 @@ class MessageWriterTextWriter : public IMessageWriter
         {
         }
 
-        virtual void writeLine(const char *text, int indent)
+        void writeLine(const char *text, int indent) override
         {
             writer_->wrapperSettings().setIndent(indent);
             writer_->writeLine(text);
         }
-        virtual void writeErrNoInfo(int errorNumber, const char *funcName,
-                                    int indent)
+        void writeErrNoInfo(int errorNumber, const char *funcName,
+                            int indent) override
         {
             writer_->wrapperSettings().setIndent(indent);
             writer_->writeLine(formatString("Reason: %s", std::strerror(errorNumber)));
@@ -400,14 +400,14 @@ class MessageWriterString : public IMessageWriter
         //! Returns the constructed string.
         const std::string &result() const { return result_; }
 
-        virtual void writeLine(const char *text, int indent)
+        void writeLine(const char *text, int indent) override
         {
             result_.append(indent, ' ');
             result_.append(text);
             result_.append("\n");
         }
-        virtual void writeErrNoInfo(int errorNumber, const char *funcName,
-                                    int indent)
+        void writeErrNoInfo(int errorNumber, const char *funcName,
+                            int indent) override
         {
             writeLine(formatString("Reason: %s", std::strerror(errorNumber)).c_str(),
                       indent);
index 9ba4cd6e4ea1a08f674175a7148edda145a70038..42d4fbfcb24095154af81521d8edf2e66518f246 100644 (file)
@@ -264,7 +264,7 @@ class GromacsException : public std::exception
     public:
         // Explicitly declared because some compiler/library combinations warn
         // about missing noexcept otherwise.
-        virtual ~GromacsException() noexcept {}
+        ~GromacsException() noexcept override {}
 
         GMX_DEFAULT_CONSTRUCTORS(GromacsException);
 
@@ -273,7 +273,7 @@ class GromacsException : public std::exception
          *
          * The return value is the string that was passed to the constructor.
          */
-        virtual const char *what() const noexcept;
+        const char *what() const noexcept override;
         /*! \brief
          * Returns the error code corresponding to the exception type.
          */
@@ -417,7 +417,7 @@ class FileIOError : public GromacsException
         explicit FileIOError(const ExceptionInitializer &details)
             : GromacsException(details) {}
 
-        virtual int errorCode() const;
+        int errorCode() const override;
 };
 
 /*! \brief
@@ -448,7 +448,7 @@ class InvalidInputError : public UserInputError
         explicit InvalidInputError(const ExceptionInitializer &details)
             : UserInputError(details) {}
 
-        virtual int errorCode() const;
+        int errorCode() const override;
 };
 
 /*! \brief
@@ -463,7 +463,7 @@ class InconsistentInputError : public UserInputError
         explicit InconsistentInputError(const ExceptionInitializer &details)
             : UserInputError(details) {}
 
-        virtual int errorCode() const;
+        int errorCode() const override;
 };
 
 /*! \brief
@@ -487,7 +487,7 @@ class ToleranceError : public GromacsException
         explicit ToleranceError(const ExceptionInitializer &details)
             : GromacsException(details) {}
 
-        virtual int errorCode() const;
+        int errorCode() const override;
 };
 
 /*! \brief
@@ -502,7 +502,7 @@ class SimulationInstabilityError : public GromacsException
         explicit SimulationInstabilityError(const ExceptionInitializer &details)
             : GromacsException(details) {}
 
-        virtual int errorCode() const;
+        int errorCode() const override;
 };
 
 /*! \brief
@@ -517,7 +517,7 @@ class InternalError : public GromacsException
         explicit InternalError(const ExceptionInitializer &details)
             : GromacsException(details) {}
 
-        virtual int errorCode() const;
+        int errorCode() const override;
 };
 
 /*! \brief
@@ -532,7 +532,7 @@ class APIError : public GromacsException
         explicit APIError(const ExceptionInitializer &details)
             : GromacsException(details) {}
 
-        virtual int errorCode() const;
+        int errorCode() const override;
 };
 
 /*! \brief
@@ -547,7 +547,7 @@ class RangeError : public GromacsException
         explicit RangeError(const ExceptionInitializer &details)
             : GromacsException(details) {}
 
-        virtual int errorCode() const;
+        int errorCode() const override;
 };
 
 /*! \brief
@@ -562,7 +562,7 @@ class NotImplementedError : public APIError
         explicit NotImplementedError(const ExceptionInitializer &details)
             : APIError(details) {}
 
-        virtual int errorCode() const;
+        int errorCode() const override;
 };
 
 /*! \brief
index 4cf13f3dbd27f58c94ce4dcf0397a72c68d7481a..cfb71e4b918de3224880d594a8c77b6f6410fe55 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015, by the GROMACS development team, led by
+ * Copyright (c) 2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -71,8 +71,8 @@ namespace
 class DefaultInputRedirector : public IFileInputRedirector
 {
     public:
-        virtual bool fileExists(const char            *filename,
-                                File::NotFoundHandler  onNotFound) const
+        bool fileExists(const char            *filename,
+                        File::NotFoundHandler  onNotFound) const override
         {
             return File::exists(filename, onNotFound);
         }
@@ -90,11 +90,11 @@ class DefaultInputRedirector : public IFileInputRedirector
 class DefaultOutputRedirector : public IFileOutputRedirector
 {
     public:
-        virtual TextOutputStream &standardOutput()
+        TextOutputStream &standardOutput() override
         {
             return TextOutputFile::standardOutput();
         }
-        virtual TextOutputStreamPointer openTextOutputFile(const char *filename)
+        TextOutputStreamPointer openTextOutputFile(const char *filename) override
         {
             return TextOutputStreamPointer(new TextOutputFile(filename));
         }
index 876c79fd848ed62af3b10a6efc85db179b23e19b..20ff047a1948d18a89b455693c99a0941d9be80a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015, by the GROMACS development team, led by
+ * Copyright (c) 2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -80,8 +80,8 @@ class StandardInputStream : public TextInputStream
         bool isInteractive() const;
 
         // From TextInputStream
-        virtual bool readLine(std::string *line);
-        virtual void close() {}
+        bool readLine(std::string *line) override;
+        void close() override {}
 
         /*! \brief
          * Returns a stream for accessing `stdin`.
@@ -134,7 +134,7 @@ class TextInputFile : public TextInputStream
          * for an object constructed this way.
          */
         explicit TextInputFile(FILE *fp);
-        virtual ~TextInputFile();
+        ~TextInputFile() override;
 
         /*! \brief
          * Returns a raw handle to the input file.
@@ -144,8 +144,8 @@ class TextInputFile : public TextInputStream
         FILE *handle();
 
         // From TextInputStream
-        virtual bool readLine(std::string *line);
-        virtual void close();
+        bool readLine(std::string *line) override;
+        void close() override;
 
     private:
         PrivateImplPointer<internal::FileStreamImpl> impl_;
@@ -167,11 +167,11 @@ class TextOutputFile : public TextOutputStream
         explicit TextOutputFile(const std::string &filename);
         //! \copydoc TextInputFile::TextInputFile(FILE *)
         explicit TextOutputFile(FILE *fp);
-        virtual ~TextOutputFile();
+        ~TextOutputFile() override;
 
         // From TextOutputStream
-        virtual void write(const char *text);
-        virtual void close();
+        void write(const char *text) override;
+        void close() override;
 
         /*! \brief
          * Returns a stream for accessing `stdout`.
index 4afe797e3aa86dd80135db4ddf3e45dc01364bbb..e9f258dbd86713110a6a9f8d3a9462b64837e01f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2016, by the GROMACS development team, led by
+ * Copyright (c) 2016,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -49,7 +49,7 @@ namespace
 class DefaultKeyValueTreeErrorHandler : public IKeyValueTreeErrorHandler
 {
     public:
-        virtual bool onError(UserInputError *ex, const KeyValueTreePath &context)
+        bool onError(UserInputError *ex, const KeyValueTreePath &context) override
         {
             std::string message
                 = formatString("While processing '%s':", context.toString().c_str());
index 934c2f938a7e200660d02aff726b97fe4260c0a6..a873cc9dd370a38361b31c5c544a9b80d837ea64 100644 (file)
@@ -55,19 +55,19 @@ class InMemorySerializer : public ISerializer
 {
     public:
         InMemorySerializer();
-        virtual ~InMemorySerializer();
+        ~InMemorySerializer() override;
 
         std::vector<char> finishAndGetBuffer();
 
         // From ISerializer
-        virtual bool reading() const { return false; }
-        virtual void doBool(bool *value);
-        virtual void doUChar(unsigned char *value);
-        virtual void doInt(int *value);
-        virtual void doInt64(int64_t *value);
-        virtual void doFloat(float *value);
-        virtual void doDouble(double *value);
-        virtual void doString(std::string *value);
+        bool reading() const override { return false; }
+        void doBool(bool *value) override;
+        void doUChar(unsigned char *value) override;
+        void doInt(int *value) override;
+        void doInt64(int64_t *value) override;
+        void doFloat(float *value) override;
+        void doDouble(double *value) override;
+        void doString(std::string *value) override;
 
     private:
         class Impl;
@@ -79,17 +79,17 @@ class InMemoryDeserializer : public ISerializer
 {
     public:
         explicit InMemoryDeserializer(const std::vector<char> &buffer);
-        virtual ~InMemoryDeserializer();
+        ~InMemoryDeserializer() override;
 
         // From ISerializer
-        virtual bool reading() const { return true; }
-        virtual void doBool(bool *value);
-        virtual void doUChar(unsigned char *value);
-        virtual void doInt(int *value);
-        virtual void doInt64(int64_t *value);
-        virtual void doFloat(float *value);
-        virtual void doDouble(double *value);
-        virtual void doString(std::string *value);
+        bool reading() const override { return true; }
+        void doBool(bool *value) override;
+        void doUChar(unsigned char *value) override;
+        void doInt(int *value) override;
+        void doInt64(int64_t *value) override;
+        void doFloat(float *value) override;
+        void doDouble(double *value) override;
+        void doString(std::string *value) override;
 
     private:
         class Impl;
index 7d138047b278cb62d670e710af4f3a0249785a5a..d183901634618f5aae763137fc8381c24ed8b8f3 100644 (file)
@@ -168,8 +168,8 @@ class KeyValueTreeBackMapping : public IKeyValueTreeBackMapping
                 std::map<std::string, Entry> childEntries_;
         };
 
-        virtual KeyValueTreePath
-        originalPath(const KeyValueTreePath &path) const
+        KeyValueTreePath
+        originalPath(const KeyValueTreePath &path) const override
         {
             const Entry *entry = &rootEntry_;
             for (const auto &element : path.elements())
index a145bd15bca5463f7cec286ec3c8ee8ef5a53124..5d286a6d9591918457efd40140a5da307c0aa24e 100644 (file)
@@ -55,7 +55,7 @@ class LogTargetCollection : public ILogTarget
             targets_.push_back(target);
         }
 
-        virtual void writeEntry(const LogEntry &entry)
+        void writeEntry(const LogEntry &entry) override
         {
             for (ILogTarget *target : targets_)
             {
@@ -72,7 +72,7 @@ class LogTargetFormatter : public ILogTarget
     public:
         explicit LogTargetFormatter(TextOutputStream *stream) : writer_(stream) {}
 
-        virtual void writeEntry(const LogEntry &entry);
+        void writeEntry(const LogEntry &entry) override;
 
     private:
         TextWriter writer_;
index 7ec9df222f87731e1f60a13ee3dbd6da77ad5589..0cae677d3df2c1cd1c8437f37b6aef425809534f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -67,14 +67,14 @@ class DefaultProgramContext : public IProgramContext
     public:
         DefaultProgramContext() {}
 
-        virtual const char *programName() const { return "GROMACS"; }
-        virtual const char *displayName() const { return "GROMACS"; }
-        virtual const char *fullBinaryPath() const { return ""; }
-        virtual InstallationPrefixInfo installationPrefix() const
+        const char *programName() const override { return "GROMACS"; }
+        const char *displayName() const override { return "GROMACS"; }
+        const char *fullBinaryPath() const override { return ""; }
+        InstallationPrefixInfo installationPrefix() const override
         {
             return InstallationPrefixInfo("", false);
         }
-        virtual const char *commandLine() const { return ""; }
+        const char *commandLine() const override { return ""; }
 };
 
 //! Global program info; stores the object set with setProgramContext().
index e92f0e009f4b7254ebb4ce7d980ad9bcc6146d46..e50788685479c31c23720b029351b0907a534c9e 100644 (file)
@@ -68,8 +68,8 @@ class StringOutputStream : public TextOutputStream
         const std::string &toString() const { return str_; }
 
         // From TextOutputStream
-        virtual void write(const char *text);
-        virtual void close();
+        void write(const char *text) override;
+        void close() override;
 
     private:
         std::string str_;
@@ -111,8 +111,8 @@ class StringInputStream : public TextInputStream
         explicit StringInputStream(ArrayRef<const char *const> const &input);
 
         // From TextInputStream
-        virtual bool readLine(std::string *line);
-        virtual void close() {}
+        bool readLine(std::string *line) override;
+        void close() override {}
     private:
         std::string input_;
         size_t      pos_;
index bd35bb952de92d361bbbf82f054c999cc1d85550..e93063f31ca6c333831228c988c20799dd8f7c57 100644 (file)
@@ -56,33 +56,33 @@ class RefDataSerializer : public gmx::ISerializer
         {
         }
 
-        virtual bool reading() const { return false; }
+        bool reading() const override { return false; }
 
-        virtual void doBool(bool *value)
+        void doBool(bool *value) override
         {
             checker_.checkBoolean(*value, nullptr);
         }
-        virtual void doUChar(unsigned char *value)
+        void doUChar(unsigned char *value) override
         {
             checker_.checkUChar(*value, nullptr);
         }
-        virtual void doInt(int *value)
+        void doInt(int *value) override
         {
             checker_.checkInteger(*value, nullptr);
         }
-        virtual void doInt64(int64_t *value)
+        void doInt64(int64_t *value) override
         {
             checker_.checkInt64(*value, nullptr);
         }
-        virtual void doFloat(float *value)
+        void doFloat(float *value) override
         {
             checker_.checkFloat(*value, nullptr);
         }
-        virtual void doDouble(double *value)
+        void doDouble(double *value) override
         {
             checker_.checkDouble(*value, nullptr);
         }
-        virtual void doString(std::string *value)
+        void doString(std::string *value) override
         {
             checker_.checkString(*value, nullptr);
         }
index 38e1d828d922b908456acb9e5af3e0928f8b3cff..5cd738bcdab972be71b9b20fb1c63548f9192a1c 100644 (file)
@@ -225,8 +225,8 @@ class Variant
                 explicit Content(const T &value) : value_(value) {}
                 explicit Content(T &&value) : value_(std::move(value)) {}
 
-                virtual const std::type_info &typeInfo() const { return typeid(T); }
-                virtual std::unique_ptr<IContent> clone() const { return compat::make_unique<Content>(value_); }
+                const std::type_info &typeInfo() const override { return typeid(T); }
+                std::unique_ptr<IContent> clone() const override { return compat::make_unique<Content>(value_); }
 
                 T value_;
         };
index 7dea2832cee5fd81fc11819ccd649fd72cee6579..75ae88e1364eb427fbad66fad15e7d603baf9e29 100644 (file)
@@ -78,24 +78,24 @@ class ObsoleteToolModule : public gmx::ICommandLineModule
         {
         }
 
-        virtual const char *name() const
+        const char *name() const override
         {
             return name_;
         }
-        virtual const char *shortDescription() const
+        const char *shortDescription() const override
         {
             return nullptr;
         }
 
-        virtual void init(gmx::CommandLineModuleSettings * /*settings*/)
+        void init(gmx::CommandLineModuleSettings * /*settings*/) override
         {
         }
-        virtual int run(int /*argc*/, char * /*argv*/[])
+        int run(int /*argc*/, char * /*argv*/[]) override
         {
             printMessage();
             return 0;
         }
-        virtual void writeHelp(const gmx::CommandLineHelpContext & /*context*/) const
+        void writeHelp(const gmx::CommandLineHelpContext & /*context*/) const override
         {
             printMessage();
         }
index 30a0ac9dc6a5419dd788bf313d98c67dcc8f3f85..c2f383b7f224d832a4f8c15b7611896abc77dddd 100644 (file)
@@ -53,7 +53,7 @@ class ImdTestFixture : public MdrunTestFixture
 {
     protected:
         ImdTestFixture();
-        ~ImdTestFixture();
+        ~ImdTestFixture() override;
 };
 
 
index 9e0f05376998f6ff5955c7b9b8a5384b1af3ca43..edba08915b5e30da553d19beda86fbbace90a4f3 100644 (file)
@@ -178,7 +178,7 @@ class MdrunTestFixtureBase : public ::testing::Test
 {
     public:
         MdrunTestFixtureBase();
-        virtual ~MdrunTestFixtureBase();
+        ~MdrunTestFixtureBase() override;
 };
 
 /*! \internal
@@ -193,7 +193,7 @@ class MdrunTestFixture : public ::testing::Test
 {
     public:
         MdrunTestFixture();
-        virtual ~MdrunTestFixture();
+        ~MdrunTestFixture() override;
 
         //! Manages temporary files during the test.
         TestFileManager  fileManager_;
index 3a207c3129921a4815bd717827b53b84ce19e145..195983f14f3d19ade35506aae937aee69d018061 100644 (file)
@@ -53,7 +53,7 @@ class SwapTestFixture : public MdrunTestFixture
 {
     protected:
         SwapTestFixture();
-        ~SwapTestFixture();
+        ~SwapTestFixture() override;
 };
 
 
index c488dc6af1ebd943f4ef89b4d3979d8f20bb47a7..1065022fd40dd12b252c9c1389f72caa5332cf56 100644 (file)
@@ -376,7 +376,7 @@ class CommandLineTestBase : public ::testing::Test
 {
     public:
         CommandLineTestBase();
-        ~CommandLineTestBase();
+        ~CommandLineTestBase() override;
 
         /*! \brief
          * Sets an input file.
index e98dfd0cc8cacfd4eeee876f69f7ff94b3b39eba..dccc71fbf1b22ac7518ab7d3356aad4f0945bb2b 100644 (file)
@@ -70,8 +70,8 @@ class ConfMatcher : public ITextBlockMatcher
         {
         }
 
-        virtual void checkStream(TextInputStream      *stream,
-                                 TestReferenceChecker *checker)
+        void checkStream(TextInputStream      *stream,
+                         TestReferenceChecker *checker) override
         {
             checkConfFile(stream, checker, settings_);
         }
index 1ef81de3155ef6374f60635a61109f9d75dd8186..5c388aba42ac6e58c22c71442c018d26fd885a1e 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2017, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -101,7 +101,7 @@ class ConfMatch : public ITextBlockMatcherSettings
             return *this;
         }
 
-        virtual TextBlockMatcherPointer createMatcher() const;
+        TextBlockMatcherPointer createMatcher() const override;
 
     private:
         ConfMatchSettings  settings_;
index cd68d3877d6e9e6bd43cb12a130bb96c5d9a8590..27c011a6c14bb923c59c4e7848f1a97369e4da93 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2017, by the GROMACS development team, led by
+ * Copyright (c) 2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -63,8 +63,8 @@ class TextFileMatcher : public IFileMatcher
         {
         }
 
-        virtual void checkFile(const std::string    &path,
-                               TestReferenceChecker *checker)
+        void checkFile(const std::string    &path,
+                       TestReferenceChecker *checker) override
         {
             TextInputFile stream(path);
             matcher_->checkStream(&stream, checker);
index 3f5746509232634ad3bcdfa3c7f94bb154d216c5..cc628ed4871a5c2f024a9e97eaa1b8fcc28ec05e 100644 (file)
@@ -132,7 +132,7 @@ class TextFileMatch : public IFileMatcherSettings
         {
         }
 
-        virtual FileMatcherPointer createFileMatcher() const;
+        FileMatcherPointer createFileMatcher() const override;
 
     private:
         const ITextBlockMatcherSettings &streamSettings_;
@@ -147,7 +147,7 @@ class TextFileMatch : public IFileMatcherSettings
 class NoContentsMatch : public IFileMatcherSettings
 {
     public:
-        virtual FileMatcherPointer createFileMatcher() const;
+        FileMatcherPointer createFileMatcher() const override;
 };
 
 } // namespace test
index 2b35b9283b557d987cde16754b5dbff4c4c4cf63..32656d27fda588d635c9e577948732ef322e3f04 100644 (file)
@@ -78,9 +78,9 @@ class IReferenceDataEntryChecker
 class NullChecker : public IReferenceDataEntryChecker
 {
     public:
-        virtual void fillEntry(ReferenceDataEntry * /*entry*/) const {}
-        virtual ::testing::AssertionResult
-        checkEntry(const ReferenceDataEntry & /*entry*/, const std::string & /*fullId*/) const
+        void fillEntry(ReferenceDataEntry * /*entry*/) const override {}
+        ::testing::AssertionResult
+        checkEntry(const ReferenceDataEntry & /*entry*/, const std::string & /*fullId*/) const override
         {
             return ::testing::AssertionSuccess();
         }
@@ -94,12 +94,12 @@ class ExactStringChecker : public IReferenceDataEntryChecker
         {
         }
 
-        virtual void fillEntry(ReferenceDataEntry *entry) const
+        void fillEntry(ReferenceDataEntry *entry) const override
         {
             entry->setValue(value_);
         }
-        virtual ::testing::AssertionResult
-        checkEntry(const ReferenceDataEntry &entry, const std::string &fullId) const
+        ::testing::AssertionResult
+        checkEntry(const ReferenceDataEntry &entry, const std::string &fullId) const override
         {
             if (entry.value() == value_)
             {
@@ -123,12 +123,12 @@ class ExactStringBlockChecker : public IReferenceDataEntryChecker
         {
         }
 
-        virtual void fillEntry(ReferenceDataEntry *entry) const
+        void fillEntry(ReferenceDataEntry *entry) const override
         {
             entry->setTextBlockValue(value_);
         }
-        virtual ::testing::AssertionResult
-        checkEntry(const ReferenceDataEntry &entry, const std::string &fullId) const
+        ::testing::AssertionResult
+        checkEntry(const ReferenceDataEntry &entry, const std::string &fullId) const override
         {
             if (entry.value() == value_)
             {
@@ -167,13 +167,13 @@ class FloatingPointChecker : public IReferenceDataEntryChecker
         {
         }
 
-        virtual void fillEntry(ReferenceDataEntry *entry) const
+        void fillEntry(ReferenceDataEntry *entry) const override
         {
             const int prec = std::numeric_limits<FloatType>::digits10 + 2;
             entry->setValue(formatString("%.*g", prec, value_));
         }
-        virtual ::testing::AssertionResult
-        checkEntry(const ReferenceDataEntry &entry, const std::string &fullId) const
+        ::testing::AssertionResult
+        checkEntry(const ReferenceDataEntry &entry, const std::string &fullId) const override
         {
             FloatType               refValue = static_cast<FloatType>(convertDoubleReferenceValue(entry.value()));
             FloatingPointDifference diff(refValue, value_);
@@ -204,12 +204,12 @@ class FloatingPointFromStringChecker : public IReferenceDataEntryChecker
         {
         }
 
-        virtual void fillEntry(ReferenceDataEntry *entry) const
+        void fillEntry(ReferenceDataEntry *entry) const override
         {
             entry->setValue(value_);
         }
-        virtual ::testing::AssertionResult
-        checkEntry(const ReferenceDataEntry &entry, const std::string &fullId) const
+        ::testing::AssertionResult
+        checkEntry(const ReferenceDataEntry &entry, const std::string &fullId) const override
         {
             FloatType               value    = fromString<FloatType>(value_);
             FloatType               refValue = static_cast<FloatType>(convertDoubleReferenceValue(entry.value()));
@@ -240,12 +240,12 @@ class ValueExtractor : public IReferenceDataEntryChecker
         {
         }
 
-        virtual void fillEntry(ReferenceDataEntry * /*entry*/) const
+        void fillEntry(ReferenceDataEntry * /*entry*/) const override
         {
             GMX_THROW(TestException("Extracting value from non-existent reference data entry"));
         }
-        virtual ::testing::AssertionResult
-        checkEntry(const ReferenceDataEntry &entry, const std::string & /*fullId*/) const
+        ::testing::AssertionResult
+        checkEntry(const ReferenceDataEntry &entry, const std::string & /*fullId*/) const override
         {
             extractValue(entry.value());
             return ::testing::AssertionSuccess();
index e0526def22625e141b2a94f61c26103177dfab6c..f703c2e2a6374269c23cd54bf18ace8d4e1d2bd1 100644 (file)
@@ -188,7 +188,7 @@ TestReferenceDataImplPointer initReferenceDataInstanceForSelfTest(ReferenceDataM
 class ReferenceDataTestEventListener : public ::testing::EmptyTestEventListener
 {
     public:
-        virtual void OnTestEnd(const ::testing::TestInfo &test_info)
+        void OnTestEnd(const ::testing::TestInfo &test_info) override
         {
             if (g_referenceData)
             {
@@ -199,7 +199,7 @@ class ReferenceDataTestEventListener : public ::testing::EmptyTestEventListener
             }
         }
 
-        virtual void OnTestProgramEnd(const ::testing::UnitTest & /*unused*/)
+        void OnTestProgramEnd(const ::testing::UnitTest & /*unused*/) override
         {
             // Could be used e.g. to free internal buffers allocated by an XML parsing library
         }
index ca0322e6ca5f61379923852303bd25b8f7a690bf..5685335cb357527859d4f49a0f2dd8d3b3616e42 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2012,2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -86,7 +86,7 @@ class StringTestBase : public ::testing::Test
                               const std::string &text, const char *id);
 
         StringTestBase();
-        ~StringTestBase();
+        ~StringTestBase() override;
 
         /*! \brief
          * Returns the root checker for this test's reference data.
index e4822e0a803d93e3d1410833b9f39e0dd99380b6..fdd595cc3d80d530ff9da3b0b395ef64ccf01634 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2011,2012,2015, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -80,7 +80,7 @@ class TestException : public GromacsException
         explicit TestException(const GromacsException &base)
             : GromacsException(base) {}
 
-        virtual int errorCode() const { return -1; }
+        int errorCode() const override { return -1; }
 };
 
 /*! \brief
index a664c50af5daaaf8b34e717d105a91cd641d5b67..e68717db7a9e2a3b3844dda83462a1663fbba7cb 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015, by the GROMACS development team, led by
+ * Copyright (c) 2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -69,7 +69,7 @@ class TestFileInputRedirector : public IFileInputRedirector
 {
     public:
         TestFileInputRedirector();
-        virtual ~TestFileInputRedirector();
+        ~TestFileInputRedirector() override;
 
         /*! \brief
          * Marks the provided path as an existing file.
@@ -81,8 +81,8 @@ class TestFileInputRedirector : public IFileInputRedirector
         void addExistingFile(const char *filename);
 
         // From IFileInputRedirector
-        virtual bool fileExists(const char            *filename,
-                                File::NotFoundHandler  onNotFound) const;
+        bool fileExists(const char            *filename,
+                        File::NotFoundHandler  onNotFound) const override;
 
     private:
         std::set<std::string> existingFiles_;
@@ -102,7 +102,7 @@ class TestFileOutputRedirector : public IFileOutputRedirector
 {
     public:
         TestFileOutputRedirector();
-        virtual ~TestFileOutputRedirector();
+        ~TestFileOutputRedirector() override;
 
         /*! \brief
          * Checks contents of all redirected files (including stdout).
@@ -115,8 +115,8 @@ class TestFileOutputRedirector : public IFileOutputRedirector
         void checkRedirectedFiles(TestReferenceChecker *checker);
 
         // From IFileOutputRedirector
-        virtual TextOutputStream &standardOutput();
-        virtual TextOutputStreamPointer openTextOutputFile(const char *filename);
+        TextOutputStream &standardOutput() override;
+        TextOutputStreamPointer openTextOutputFile(const char *filename) override;
 
     private:
         class Impl;
index 882931b1286f5785da22daa920c2522bb09e869f..cf3a108ae8caa7a3263efeb3b94f982fe0997821 100644 (file)
@@ -112,23 +112,23 @@ class TestProgramContext : public IProgramContext
             dataPath_ = sourceRoot;
         }
 
-        virtual const char *programName() const
+        const char *programName() const override
         {
             return context_.programName();
         }
-        virtual const char *displayName() const
+        const char *displayName() const override
         {
             return context_.displayName();
         }
-        virtual const char *fullBinaryPath() const
+        const char *fullBinaryPath() const override
         {
             return context_.fullBinaryPath();
         }
-        virtual InstallationPrefixInfo installationPrefix() const
+        InstallationPrefixInfo installationPrefix() const override
         {
             return InstallationPrefixInfo(dataPath_.c_str(), true);
         }
-        virtual const char *commandLine() const
+        const char *commandLine() const override
         {
             return context_.commandLine();
         }
index 2644274c22847d98021fdd68131ac3fa0e43f898..04e41163115db154f76bf29033e23d93157670a1 100644 (file)
@@ -70,8 +70,8 @@ class FloatTypeMatcher : public testing::MatcherInterface < std::tuple < FloatTy
         FloatTypeMatcher(const FloatingPointTolerance &tolerance)
             : tolerance_(tolerance) {}
         //! Compare the two elements of \c arg, return whether they are equal, and comment on \c listener when they are not.
-        virtual bool MatchAndExplain(std::tuple<FloatType, FloatType> arg,
-                                     testing::MatchResultListener* listener) const
+        bool MatchAndExplain(std::tuple<FloatType, FloatType> arg,
+                             testing::MatchResultListener* listener) const override
         {
             const FloatType        &value1 = std::get<0>(arg);
             const FloatType        &value2 = std::get<1>(arg);
@@ -88,12 +88,12 @@ class FloatTypeMatcher : public testing::MatcherInterface < std::tuple < FloatTy
             return false;
         }
         //! Describe to a human what matching means.
-        virtual void DescribeTo(::std::ostream* os) const
+        void DescribeTo(::std::ostream* os) const override
         {
             *os << "matches within tolerance";
         }
         //! Describe to a human what failing to match means.
-        virtual void DescribeNegationTo(::std::ostream* os) const
+        void DescribeNegationTo(::std::ostream* os) const override
         {
             *os << "does not match within tolerance";
         }
@@ -135,8 +135,8 @@ class RVecMatcher :
         RVecMatcher(const FloatingPointTolerance &tolerance)
             : tolerance_(tolerance) {}
         //! Compare the two elements of \c arg, return whether they are equal, and comment on \c listener when they are not.
-        virtual bool MatchAndExplain(std::tuple<VectorType, VectorType> arg,
-                                     testing::MatchResultListener* listener) const
+        bool MatchAndExplain(std::tuple<VectorType, VectorType> arg,
+                             testing::MatchResultListener* listener) const override
         {
             const VectorType           &lhs = std::get<0>(arg);
             const VectorType           &rhs = std::get<1>(arg);
@@ -150,12 +150,12 @@ class RVecMatcher :
             return matches;
         }
         //! Describe to a human what matching means.
-        virtual void DescribeTo(::std::ostream* os) const
+        void DescribeTo(::std::ostream* os) const override
         {
             *os << "matches all elements within tolerance";
         }
         //! Describe to a human what failing to match means.
-        virtual void DescribeNegationTo(::std::ostream* os) const
+        void DescribeNegationTo(::std::ostream* os) const override
         {
             *os << "does not match all elements within tolerance";
         }
index 4b3dc6850421350c1322a5ad721c6d1c39ec7387..de7c06a79a027167a650a5723ae53ffb6ea383d4 100644 (file)
@@ -62,8 +62,8 @@ namespace
 class ExactTextMatcher : public ITextBlockMatcher
 {
     public:
-        virtual void checkStream(TextInputStream      *stream,
-                                 TestReferenceChecker *checker)
+        void checkStream(TextInputStream      *stream,
+                         TestReferenceChecker *checker) override
         {
             TextReader reader(stream);
             checker->checkTextBlock(reader.readAll(), "Contents");
@@ -73,8 +73,8 @@ class ExactTextMatcher : public ITextBlockMatcher
 class NoTextMatcher : public ITextBlockMatcher
 {
     public:
-        virtual void checkStream(TextInputStream      * /*stream*/,
-                                 TestReferenceChecker * /*checker*/)
+        void checkStream(TextInputStream      * /*stream*/,
+                         TestReferenceChecker * /*checker*/) override
         {
         }
 };
@@ -84,8 +84,8 @@ class FilteringExactTextMatcher : public ITextBlockMatcher
     public:
         FilteringExactTextMatcher(const std::vector<std::string> &linesToSkip)
             : linesToSkip_(linesToSkip) {}
-        virtual void checkStream(TextInputStream      *stream,
-                                 TestReferenceChecker *checker)
+        void checkStream(TextInputStream      *stream,
+                         TestReferenceChecker *checker) override
         {
             StringOutputStream filteredStream;
             {
index 227809a728144ecee247fba00ede4252fbeecbca..7f1f19fa9beb5084edeb2b815f87c17568483e63 100644 (file)
@@ -129,7 +129,7 @@ class ITextBlockMatcherSettings
 class ExactTextMatch : public ITextBlockMatcherSettings
 {
     public:
-        virtual TextBlockMatcherPointer createMatcher() const;
+        TextBlockMatcherPointer createMatcher() const override;
 };
 
 /*! \libinternal \brief
@@ -141,7 +141,7 @@ class ExactTextMatch : public ITextBlockMatcherSettings
 class NoTextMatch : public ITextBlockMatcherSettings
 {
     public:
-        virtual TextBlockMatcherPointer createMatcher() const;
+        TextBlockMatcherPointer createMatcher() const override;
 };
 
 /*! \libinternal \brief
@@ -160,7 +160,7 @@ class FilteringExactTextMatch : public ITextBlockMatcherSettings
 {
     public:
         //! Factory method.
-        virtual TextBlockMatcherPointer createMatcher() const;
+        TextBlockMatcherPointer createMatcher() const override;
         //! Add a regular expression for which a matching line should be skipped.
         void addRegexToSkip(const std::string &lineToSkip);
     private:
index d1b2a3e6f0f189cf891753211bedd64c292ee0c3..66249a3fc07ce70cacae8b4945c556a9e6330625 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -73,8 +73,8 @@ class XvgMatcher : public ITextBlockMatcher
         {
         }
 
-        virtual void checkStream(TextInputStream      *stream,
-                                 TestReferenceChecker *checker)
+        void checkStream(TextInputStream      *stream,
+                         TestReferenceChecker *checker) override
         {
             checkXvgFile(stream, checker, settings_);
         }
index 6fba81d99f4b4827f6939c98013580d0b51c6824..e92c8d99d57c092850fdc390b93d9dc573ca337c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2015, by the GROMACS development team, led by
+ * Copyright (c) 2015,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -117,7 +117,7 @@ class XvgMatch : public ITextBlockMatcherSettings
             return *this;
         }
 
-        virtual TextBlockMatcherPointer createMatcher() const;
+        TextBlockMatcherPointer createMatcher() const override;
 
     private:
         XvgMatchSettings  settings_;