Fixes for issues found by clang 6
authorMark Abraham <mark.j.abraham@gmail.com>
Mon, 8 Jan 2018 08:22:16 +0000 (09:22 +0100)
committerMark Abraham <mark.j.abraham@gmail.com>
Fri, 19 Jan 2018 07:06:10 +0000 (08:06 +0100)
Change-Id: Ibdaad0a36d30659f2f9fa8bf142d311bc1f38b2d

src/gromacs/gmxana/gmx_awh.cpp
src/gromacs/mdtypes/imdoutputprovider.h
src/gromacs/utility/keyvaluetreetransform.h

index adf06ef22fb0ddeeb1e5093650898af1a18568fc..3655ac9d4437cf144c85433ad186cf30c149e791 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 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.
@@ -182,11 +182,9 @@ class BiasReader
     public:
         //! Constructor.
         BiasReader(int                         subblockStart,
-                   int                         numSubBlocks,
                    std::unique_ptr<OutputFile> awhOutputFile,
                    std::unique_ptr<OutputFile> frictionOutputFile) :
             subblockStart_(subblockStart),
-            numSubBlocks_(numSubBlocks),
             awhOutputFile_(std::move(awhOutputFile)),
             frictionOutputFile_(std::move(frictionOutputFile))
         {
@@ -214,7 +212,6 @@ class BiasReader
 
     private:
         const int                   subblockStart_;      /**< The start index of the subblocks to read. */
-        const int                   numSubBlocks_;       /**< Number of subblocks to read. */
         std::unique_ptr<OutputFile> awhOutputFile_;      /**< The standard AWH output file data. */
         std::unique_ptr<OutputFile> frictionOutputFile_; /**< The friction/metric tensor output file data */
 };
@@ -452,7 +449,7 @@ AwhReader::AwhReader(const AwhParams  *awhParams,
             frictionOutputFile->initializeFrictionOutputFile(subblockStart, numSubBlocks, awhBiasParams, energyUnit, kT);
         }
 
-        biasReader_.emplace_back(BiasReader(subblockStart, numSubBlocks,
+        biasReader_.emplace_back(BiasReader(subblockStart,
                                             std::move(awhOutputFile),
                                             std::move(frictionOutputFile)));
 
index b02f97fc44955ce72508e682388f5ceba13e7d41..4a437fe19aee7389933cb04fe802f6ae0e517e8a 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.
@@ -89,7 +89,7 @@ class IMDOutputProvider
         virtual void finishOutput() = 0;
 
     protected:
-        ~IMDOutputProvider() {}
+        virtual ~IMDOutputProvider() {}
 };
 
 } // namespace gmx
index a44a65830b9dfb8a250b5d3015c12a7379029514..d4f3c5c146ab1a22f68d56d1e039cce81b27061e 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.
@@ -111,7 +111,7 @@ class IKeyValueTreeTransformRules
         scopedTransform(const KeyValueTreePath &scope) = 0;
 
     protected:
-        ~IKeyValueTreeTransformRules();
+        virtual ~IKeyValueTreeTransformRules();
 };
 
 /*! \libinternal \brief