diff --git a/src/analysis/Analysis.cpp b/src/analysis/Analysis.cpp index c108897c0066de11ffc7e9b0ec5ef48cdcc4ba74..d427897d4aef73f703089695b5017c6d6a6aa26a 100644 --- a/src/analysis/Analysis.cpp +++ b/src/analysis/Analysis.cpp @@ -326,7 +326,7 @@ void Analysis::runFinalJobs() { runAnalysis(); } -std::string Analysis::saveResultsFromPreviousAnalyses( const std::string filename ){ +std::string Analysis::saveResultsFromPreviousAnalyses( const std::string & filename ){ FILE* ff=std::fopen( filename.c_str() ,"r"); // Perhaps replace this with an warning and a backup at some stage if(ff && !firstAnalysisDone) error("found file named " + filename + " from previous calculation"); diff --git a/src/analysis/Analysis.h b/src/analysis/Analysis.h index 9d3711dc823ad30e9c13f1fdf99df34b0fdb392e..092e1890520fa40e5daa2e85c27077a89f801718 100644 --- a/src/analysis/Analysis.h +++ b/src/analysis/Analysis.h @@ -101,7 +101,7 @@ protected: /// Are we analyzing each data block separately (if we are not this also returns the old normalization ) bool usingMemory() const; /// Save the results in files from previous runs of the analysis algorithm - std::string saveResultsFromPreviousAnalyses( const std::string filename ); + std::string saveResultsFromPreviousAnalyses( const std::string & filename ); /// Convert the stored log weights to proper weights void finalizeWeights( const bool& ignore_weights ); /// Overwrite ActionWithArguments getArguments() so that we don't return diff --git a/src/colvar/PropertyMap.cpp b/src/colvar/PropertyMap.cpp index a096a24c62cc5122f68203b69e45d4b83f613314..888900d8628f41313f3fd6cc4494c7340f4d7c9a 100644 --- a/src/colvar/PropertyMap.cpp +++ b/src/colvar/PropertyMap.cpp @@ -101,7 +101,7 @@ PathMSDBase(ao) }else{ for(unsigned i=0;i<labels.size();i++){ log<<" found custom propety to be found in the REMARK line: "<<labels[i].c_str()<<"\n"; - addComponentWithDerivatives(labels[i].c_str()); componentIsNotPeriodic(labels[i].c_str()); + addComponentWithDerivatives(labels[i]); componentIsNotPeriodic(labels[i]); } // add distance anyhow addComponentWithDerivatives("zzz"); componentIsNotPeriodic("zzz"); diff --git a/src/tools/Keywords.cpp b/src/tools/Keywords.cpp index 186b219a568c627ee281bc2d698b7b7aa2452af6..eb7373948697ab6cdd8ccc3cd0b9426e6d7849d4 100644 --- a/src/tools/Keywords.cpp +++ b/src/tools/Keywords.cpp @@ -125,7 +125,7 @@ void Keywords::reserveFlag( const std::string & k, const bool def, const std::st reserved_keys.push_back(k); } -void Keywords::use( const std::string k ){ +void Keywords::use( const std::string & k ){ plumed_massert( reserved(k), "the " + k + " keyword is not reserved"); for(unsigned i=0;i<reserved_keys.size();++i){ if(reserved_keys[i]==k) keys.push_back( reserved_keys[i] ); diff --git a/src/tools/Keywords.h b/src/tools/Keywords.h index 345d278ba0628a273972d1c34a37f55aa6e1abf1..ebbb77665e6ad6c3cd62057b263d8532947e754e 100644 --- a/src/tools/Keywords.h +++ b/src/tools/Keywords.h @@ -98,7 +98,7 @@ public: /// Reserve a flag void reserveFlag( const std::string & k, const bool def, const std::string & d ); /// Use one of the reserved keywords - void use( const std::string k ); + void use( const std::string & k ); /// Get the ith keyword std::string get( const unsigned k ) const ; /// Add a new keyword of type t with name k and description d diff --git a/src/tools/Tensor.h b/src/tools/Tensor.h index ff9d82cdd9a55b704e80b45bf7bff980b840fa59..f2ca4f61493ee6e428240c3f5da98a977ad3c50b 100644 --- a/src/tools/Tensor.h +++ b/src/tools/Tensor.h @@ -146,7 +146,7 @@ public: friend VectorGeneric<n_> matmul(const TensorGeneric<n_,m_>&,const TensorGeneric<m_,l_>&,const VectorGeneric<l_>&); /// vector-matrix-matrix multiplication template<unsigned n_,unsigned m_,unsigned l_> - friend VectorGeneric<l_> matmul(const VectorGeneric<n_>,const TensorGeneric<n_,m_>&,const TensorGeneric<m_,l_>&); + friend VectorGeneric<l_> matmul(const VectorGeneric<n_>&,const TensorGeneric<n_,m_>&,const TensorGeneric<m_,l_>&); /// returns the determinant of a tensor friend double determinant(const TensorGeneric<3,3>&); /// returns the inverse of a tensor (same as inverse()) @@ -373,7 +373,7 @@ VectorGeneric<n> matmul(const TensorGeneric<n,m>&a,const TensorGeneric<m,l>&b,co } template<unsigned n,unsigned m,unsigned l> -VectorGeneric<l> matmul(const VectorGeneric<n>a,const TensorGeneric<n,m>&b,const TensorGeneric<m,l>&c){ +VectorGeneric<l> matmul(const VectorGeneric<n>&a,const TensorGeneric<n,m>&b,const TensorGeneric<m,l>&c){ return matmul(matmul(a,b),c); } diff --git a/src/wrapper/Plumed.h b/src/wrapper/Plumed.h index 77f93716df521a306e858db6b34660ca542fa2b3..c992d75cf3dc753c79c0a1d3ef7795d7a64bf602 100644 --- a/src/wrapper/Plumed.h +++ b/src/wrapper/Plumed.h @@ -426,22 +426,21 @@ bool Plumed::installed(){ inline Plumed::Plumed(): - cloned(false){ - main=plumed_create(); -} + main(plumed_create()), + cloned(false) +{} inline Plumed::Plumed(const char*c): - cloned(true){ - main=plumed_f2c(c); -} + main(plumed_f2c(c)), + cloned(true) +{} inline Plumed::Plumed(plumed p): + main(p), cloned(true) -{ - main=p; -} +{} inline Plumed::operator plumed()const{