/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2019,2020, by the GROMACS development team, led by
+ * Copyright (c) 2019,2020,2021, 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 "pairsearch.h"
#include "gromacs/mdtypes/nblist.h"
-#include "gromacs/utility/smalloc.h"
#include "pairlist.h"
fprintf(fp, "\n");
}
-/*! \brief Frees the contents of a legacy t_nblist struct */
-static void free_nblist(t_nblist* nl)
-{
- sfree(nl->iinr);
- sfree(nl->gid);
- sfree(nl->shift);
- sfree(nl->jindex);
- sfree(nl->jjnr);
- sfree(nl->excl_fep);
-}
-
#ifndef DOXYGEN
-PairsearchWork::PairsearchWork() : cp0({ { 0 } }), ndistc(0), nbl_fep(new t_nblist), cp1({ { 0 } })
+PairsearchWork::PairsearchWork() :
+ cp0({ { 0 } }),
+ ndistc(0),
+ nbl_fep(std::make_unique<t_nblist>()),
+ cp1({ { 0 } })
{
- nbnxn_init_pairlist_fep(nbl_fep.get());
}
#endif // !DOXYGEN
-PairsearchWork::~PairsearchWork()
-{
- free_nblist(nbl_fep.get());
-}
+PairsearchWork::~PairsearchWork() = default;
PairSearch::PairSearch(const PbcType pbcType,
const bool doTestParticleInsertion,