Merge branch 'master' into pygromacs
[alexxy/gromacs.git] / src / gromacs / gmxana / pp2shift.cpp
similarity index 96%
rename from src/gromacs/gmxana/pp2shift.c
rename to src/gromacs/gmxana/pp2shift.cpp
index fa12f6d0b6afed5d822f886780f87ceb6719b0ea..0ca2c3ad7d7a1e66a4500e2d5a329ae0edba5845 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
  * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
  */
 #include "gmxpre.h"
 
-#include <math.h>
-#include <stdlib.h>
+#include <cmath>
+#include <cstdlib>
+
+#include <algorithm>
 
 #include "gromacs/fileio/matio.h"
 #include "gromacs/gmxana/gstat.h"
@@ -131,8 +133,8 @@ static void dump_sd(const char *fn, t_shiftdata *sd)
                newdata[i][j] = sd->data[i/nfac][j/nfac];
                else*/
             newdata[i][j] = interpolate(phi, psi, sd);
-            lo            = min(lo, newdata[i][j]);
-            hi            = max(hi, newdata[i][j]);
+            lo            = std::min(lo, newdata[i][j]);
+            hi            = std::max(hi, newdata[i][j]);
         }
     }
     sprintf(buf, "%s.xpm", fn);