Convert gmx_mtop_t to C++
[alexxy/gromacs.git] / src / gromacs / gmxana / gmx_clustsize.cpp
index 5ea9d9fa79c2defd4313d21de27f674d6c009319..3a81b9b7362b7c5cc2b9e672ea9e3c17666aafe8 100644 (file)
@@ -114,7 +114,7 @@ static void clust_size(const char *ndx, const char *trx, const char *xpm,
 
     if (tpr)
     {
-        snew(mtop, 1);
+        mtop = new gmx_mtop_t;
         read_tpxheader(tpr, &tpxh, TRUE);
         if (tpxh.natoms != natoms)
         {
@@ -444,8 +444,7 @@ static void clust_size(const char *ndx, const char *trx, const char *xpm,
     gmx_ffclose(fp);
     if (mtop)
     {
-        done_mtop(mtop);
-        sfree(mtop);
+        delete mtop;
     }
     sfree(t_x);
     sfree(t_y);