Replace sqrt with std::sqrt in mdatoms.cpp
authorAndrey Alekseenko <al42and@gmail.com>
Fri, 19 Feb 2021 09:20:35 +0000 (10:20 +0100)
committerAndrey Alekseenko <al42and@gmail.com>
Fri, 19 Feb 2021 11:11:03 +0000 (11:11 +0000)
We are including <cmath>, so we should use versions from the std namespace.

src/gromacs/mdlib/mdatoms.cpp

index ff28562028ecc90f68cbc00354267c481278d192..22f3ce96a1813f838b9b662b7332ff022a4165f0 100644 (file)
@@ -437,7 +437,7 @@ void atoms2md(const gmx_mtop_t*  mtop,
             {
                 c6  = mtop->ffparams.iparams[atom.type * (mtop->ffparams.atnr + 1)].lj.c6;
                 c12 = mtop->ffparams.iparams[atom.type * (mtop->ffparams.atnr + 1)].lj.c12;
-                md->sqrt_c6A[i] = sqrt(c6);
+                md->sqrt_c6A[i] = std::sqrt(c6);
                 if (c6 == 0.0 || c12 == 0)
                 {
                     md->sigmaA[i] = 1.0;
@@ -457,7 +457,7 @@ void atoms2md(const gmx_mtop_t*  mtop,
                 {
                     c6  = mtop->ffparams.iparams[atom.typeB * (mtop->ffparams.atnr + 1)].lj.c6;
                     c12 = mtop->ffparams.iparams[atom.typeB * (mtop->ffparams.atnr + 1)].lj.c12;
-                    md->sqrt_c6B[i] = sqrt(c6);
+                    md->sqrt_c6B[i] = std::sqrt(c6);
                     if (c6 == 0.0 || c12 == 0)
                     {
                         md->sigmaB[i] = 1.0;