Skip to content
Snippets Groups Projects
Commit 28ca1704 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Added explicit statements

cppcheck warnings
parent 77c057b9
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 20 deletions
...@@ -56,7 +56,7 @@ protected: ...@@ -56,7 +56,7 @@ protected:
AnalysisBase* my_input_data; AnalysisBase* my_input_data;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
AnalysisBase(const ActionOptions&); explicit AnalysisBase(const ActionOptions&);
/// These are required because we inherit from both ActionAtomistic and ActionWithArguments /// These are required because we inherit from both ActionAtomistic and ActionWithArguments
void lockRequests(); void lockRequests();
void unlockRequests(); void unlockRequests();
......
...@@ -44,7 +44,7 @@ private: ...@@ -44,7 +44,7 @@ private:
Matrix<double> dissimilarities; Matrix<double> dissimilarities;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
EuclideanDissimilarityMatrix( const ActionOptions& ao ); explicit EuclideanDissimilarityMatrix( const ActionOptions& ao );
/// Do the analysis /// Do the analysis
void performAnalysis(); void performAnalysis();
/// This ensures that classes that use this data know that dissimilarities were set /// This ensures that classes that use this data know that dissimilarities were set
......
...@@ -40,7 +40,7 @@ private: ...@@ -40,7 +40,7 @@ private:
unsigned seed; unsigned seed;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
FarthestPointSampling( const ActionOptions& ao ); explicit FarthestPointSampling( const ActionOptions& ao );
void selectLandmarks(); void selectLandmarks();
}; };
......
...@@ -45,7 +45,7 @@ protected: ...@@ -45,7 +45,7 @@ protected:
void voronoiAnalysis( const std::vector<unsigned>& myindices, std::vector<double>& lweights, std::vector<unsigned>& assignments ) const ; void voronoiAnalysis( const std::vector<unsigned>& myindices, std::vector<double>& lweights, std::vector<unsigned>& assignments ) const ;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
LandmarkSelectionBase( const ActionOptions& ao ); explicit LandmarkSelectionBase( const ActionOptions& ao );
/// Return the number of data points /// Return the number of data points
unsigned getNumberOfDataPoints() const ; unsigned getNumberOfDataPoints() const ;
/// Return the index of the data point in the base class /// Return the index of the data point in the base class
......
...@@ -43,7 +43,7 @@ private: ...@@ -43,7 +43,7 @@ private:
double gamma; double gamma;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
LandmarkStaged( const ActionOptions& ao ); explicit LandmarkStaged( const ActionOptions& ao );
void selectLandmarks(); void selectLandmarks();
}; };
......
...@@ -52,7 +52,7 @@ private: ...@@ -52,7 +52,7 @@ private:
std::vector<std::string> req_vals; std::vector<std::string> req_vals;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
OutputColvarFile( const ActionOptions& ); explicit OutputColvarFile( const ActionOptions& );
void performTask( const unsigned&, const unsigned&, MultiValue& ) const { plumed_error(); } void performTask( const unsigned&, const unsigned&, MultiValue& ) const { plumed_error(); }
void performAnalysis(); void performAnalysis();
}; };
......
...@@ -42,7 +42,7 @@ private: ...@@ -42,7 +42,7 @@ private:
std::string fname; std::string fname;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
PrintDissimilarityMatrix( const ActionOptions& ao ); explicit PrintDissimilarityMatrix( const ActionOptions& ao );
void performAnalysis(); void performAnalysis();
void performTask( const unsigned&, const unsigned&, MultiValue& ) const { plumed_error(); } void performTask( const unsigned&, const unsigned&, MultiValue& ) const { plumed_error(); }
}; };
......
...@@ -51,7 +51,7 @@ private: ...@@ -51,7 +51,7 @@ private:
std::vector<double> weights; std::vector<double> weights;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
ReadDissimilarityMatrix( const ActionOptions& ao ); explicit ReadDissimilarityMatrix( const ActionOptions& ao );
unsigned getNumberOfDataPoints() const ; unsigned getNumberOfDataPoints() const ;
// Return the index of the data point in the base class // Return the index of the data point in the base class
unsigned getDataPointIndexInBase( const unsigned& idata ) const ; unsigned getDataPointIndexInBase( const unsigned& idata ) const ;
......
...@@ -42,7 +42,7 @@ private: ...@@ -42,7 +42,7 @@ private:
LandmarkSelectionBase* mylandmarks; LandmarkSelectionBase* mylandmarks;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
ReselectLandmarks( const ActionOptions& ao ); explicit ReselectLandmarks( const ActionOptions& ao );
void selectLandmarks(); void selectLandmarks();
}; };
......
...@@ -40,7 +40,7 @@ private: ...@@ -40,7 +40,7 @@ private:
unsigned seed; unsigned seed;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
SelectRandomFrames( const ActionOptions& ao ); explicit SelectRandomFrames( const ActionOptions& ao );
void selectLandmarks(); void selectLandmarks();
}; };
......
...@@ -37,7 +37,7 @@ This can be used to output the a histogram using the weighted histogram techniqu ...@@ -37,7 +37,7 @@ This can be used to output the a histogram using the weighted histogram techniqu
class WhamHistogram : public ActionShortcut { class WhamHistogram : public ActionShortcut {
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
WhamHistogram( const ActionOptions& ); explicit WhamHistogram( const ActionOptions& );
}; };
PLUMED_REGISTER_ACTION(WhamHistogram,"WHAM_HISTOGRAM") PLUMED_REGISTER_ACTION(WhamHistogram,"WHAM_HISTOGRAM")
......
...@@ -37,7 +37,7 @@ This can be used to output the data that has been stored in an Analysis object. ...@@ -37,7 +37,7 @@ This can be used to output the data that has been stored in an Analysis object.
class WhamWeights : public ActionShortcut { class WhamWeights : public ActionShortcut {
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
WhamWeights( const ActionOptions& ); explicit WhamWeights( const ActionOptions& );
}; };
PLUMED_REGISTER_ACTION(WhamWeights,"WHAM_WEIGHTS") PLUMED_REGISTER_ACTION(WhamWeights,"WHAM_WEIGHTS")
......
...@@ -43,7 +43,7 @@ protected: ...@@ -43,7 +43,7 @@ protected:
DimensionalityReductionBase* dimredbase; DimensionalityReductionBase* dimredbase;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
DimensionalityReductionBase( const ActionOptions& ); explicit DimensionalityReductionBase( const ActionOptions& );
/// Get the ith data point (this returns the projection) /// Get the ith data point (this returns the projection)
virtual void getProjection( const unsigned& idata, std::vector<double>& point, double& weight ); virtual void getProjection( const unsigned& idata, std::vector<double>& point, double& weight );
/// Actually perform the analysis /// Actually perform the analysis
......
...@@ -50,7 +50,7 @@ private: ...@@ -50,7 +50,7 @@ private:
std::string filename; std::string filename;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
OutputPCAProjection( const ActionOptions& ); explicit OutputPCAProjection( const ActionOptions& );
void performTask( const unsigned&, const unsigned&, MultiValue& ) const { plumed_error(); } void performTask( const unsigned&, const unsigned&, MultiValue& ) const { plumed_error(); }
void performAnalysis(); void performAnalysis();
}; };
......
...@@ -53,7 +53,7 @@ private: ...@@ -53,7 +53,7 @@ private:
void generateProjection( const unsigned& idat, std::vector<double>& point ); void generateProjection( const unsigned& idat, std::vector<double>& point );
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
ProjectNonLandmarkPoints( const ActionOptions& ao ); explicit ProjectNonLandmarkPoints( const ActionOptions& ao );
/// Get a reference configuration (this returns the projection) /// Get a reference configuration (this returns the projection)
analysis::DataCollectionObject& getStoredData( const unsigned& idat, const bool& calcdist ); analysis::DataCollectionObject& getStoredData( const unsigned& idat, const bool& calcdist );
/// Overwrite getArguments so we get arguments from underlying class /// Overwrite getArguments so we get arguments from underlying class
......
...@@ -37,7 +37,7 @@ This can be used to output the data that has been stored in an Analysis object. ...@@ -37,7 +37,7 @@ This can be used to output the data that has been stored in an Analysis object.
class SketchMap : public ActionShortcut { class SketchMap : public ActionShortcut {
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
SketchMap( const ActionOptions& ); explicit SketchMap( const ActionOptions& );
}; };
PLUMED_REGISTER_ACTION(SketchMap,"SKETCH_MAP") PLUMED_REGISTER_ACTION(SketchMap,"SKETCH_MAP")
......
...@@ -49,7 +49,7 @@ protected: ...@@ -49,7 +49,7 @@ protected:
double mixparam; double mixparam;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
SketchMapBase( const ActionOptions& ); explicit SketchMapBase( const ActionOptions& );
/// This starts the process of calculating the projections /// This starts the process of calculating the projections
void calculateProjections( const Matrix<double>&, Matrix<double>& ); void calculateProjections( const Matrix<double>&, Matrix<double>& );
/// This finishes the process of calculating the prjections /// This finishes the process of calculating the prjections
......
...@@ -40,7 +40,7 @@ private: ...@@ -40,7 +40,7 @@ private:
double cgtol; double cgtol;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
SketchMapConjGrad( const ActionOptions& ao ); explicit SketchMapConjGrad( const ActionOptions& ao );
void minimise( Matrix<double>& ); void minimise( Matrix<double>& );
}; };
......
...@@ -43,7 +43,7 @@ private: ...@@ -43,7 +43,7 @@ private:
std::vector<unsigned> npoints, nfgrid; std::vector<unsigned> npoints, nfgrid;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
SketchMapPointwise( const ActionOptions& ao ); explicit SketchMapPointwise( const ActionOptions& ao );
void minimise( Matrix<double>& ); void minimise( Matrix<double>& );
}; };
......
...@@ -53,7 +53,7 @@ private: ...@@ -53,7 +53,7 @@ private:
std::vector<std::unique_ptr<ReferenceConfiguration> > myframes; std::vector<std::unique_ptr<ReferenceConfiguration> > myframes;
public: public:
static void registerKeywords( Keywords& keys ); static void registerKeywords( Keywords& keys );
SketchMapRead( const ActionOptions& ao ); explicit SketchMapRead( const ActionOptions& ao );
void minimise( Matrix<double>& ); void minimise( Matrix<double>& );
analysis::DataCollectionObject& getStoredData( const unsigned& idata, const bool& calcdist ); analysis::DataCollectionObject& getStoredData( const unsigned& idata, const bool& calcdist );
unsigned getNumberOfDataPoints() const ; unsigned getNumberOfDataPoints() const ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment