/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2009,2010,2012, by the GROMACS development team, led by
- * David van der Spoel, Berk Hess, Erik Lindahl, and including many
- * others, as listed in the AUTHORS file in the top-level source
- * directory and at http://www.gromacs.org.
+ * Copyright (c) 2009,2010,2012,2013,2014, 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.
*
* GROMACS is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* \author Teemu Murtola <teemu.murtola@gmail.com>
* \ingroup module_selection
*/
-#include "gromacs/legacyheaders/smalloc.h"
+#include "gmxpre.h"
+
+#include "selvalue.h"
#include "gromacs/selection/indexutil.h"
#include "gromacs/selection/position.h"
-#include "gromacs/selection/selvalue.h"
+#include "gromacs/utility/gmxassert.h"
+#include "gromacs/utility/smalloc.h"
/*!
* \param[out] val Output structure
}
break;
case POS_VALUE:
- srenew(val->u.p, n);
- for (i = val->nalloc; i < n; ++i)
- {
- gmx_ana_pos_clear(&val->u.p[i]);
- }
+ GMX_RELEASE_ASSERT(val->u.ptr == NULL,
+ "Reallocation of position values not supported");
+ val->u.p = new gmx_ana_pos_t[n];
break;
case GROUP_VALUE:
srenew(val->u.g, n);