Avoid passing a temporary object to emplace_back
[alexxy/gromacs.git] / src / gromacs / gmxpreprocess / vsite_parm.cpp
index 9e6eabffd0594ee47bd5df65150a4da898df828d..655b5673a8f38e22da2578fca283749a91dbde84 100644 (file)
@@ -159,7 +159,7 @@ static int vsite_bond_nrcheck(int ftype)
 static void enter_bonded(int nratoms, std::vector<VsiteBondedInteraction>* bondeds, const InteractionOfType& type)
 {
     GMX_RELEASE_ASSERT(nratoms == type.atoms().ssize(), "Size of atom array must match");
-    bondeds->emplace_back(VsiteBondedInteraction(type.atoms(), type.c0()));
+    bondeds->emplace_back(type.atoms(), type.c0());
 }
 
 /*! \internal \brief