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

Fixes for cppcheck 1.88

parent 9163dd22
No related branches found
No related tags found
No related merge requests found
......@@ -338,7 +338,15 @@ inline
Stopwatch::Handler & Stopwatch::Handler::operator=(Handler && handler) noexcept {
if(this!=&handler) {
if(watch) {
if(stop) watch->stop();
if(stop) {
try {
watch->stop();
} catch(...) {
// this is to avoid problems with cppcheck, given than this method is declared as
// noexcept and stop might throw in case of an internal bug
std::terminate();
}
}
else watch->pause();
}
// cppcheck complains about this:
......
......@@ -545,7 +545,7 @@ void diagMatSym(const TensorGeneric<n,n>&mat,VectorGeneric<m>&evals,TensorGeneri
int lwork=work.size();
TensorGenericAux::local_dsyevr("V", (n==m?"A":"I"), "U", &nn, const_cast<double*>(&mat[0][0]), &nn, &vl, &vu, &one, &mm,
&abstol, &mout, &evals[0], &evec[0][0], &nn,
&isup[0], &work[0], &lwork, &iwork[0], &liwork, &info);
isup.data(), work.data(), &lwork, iwork.data(), &liwork, &info);
if(info!=0) plumed_error()<<"Error diagonalizing matrix\n"
<<"Matrix:\n"<<mat<<"\n"
<<"Info: "<<info<<"\n";
......
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