From: Alan Gray Date: Tue, 4 Aug 2020 12:30:35 +0000 (+0000) Subject: Fix compilation issue: pass variable of expected type to resize X-Git-Url: http://biod.pnpi.spb.ru/gitweb/?a=commitdiff_plain;h=e1c98a13f5584c430c9d93deea47d84858ca7ee4;p=alexxy%2Fgromacs.git Fix compilation issue: pass variable of expected type to resize Compilation was failing under certian situations since a7e51062b4 because of the line flags->resize(sizeNeededForBufferFlags(numAtoms),0); since the second arg is expected to be of type gmx_bitmask_t to match the type in the flags vector. This patch fixes by explicitly passing a zeroed variable of the correct type. --- diff --git a/src/gromacs/nbnxm/pairlist.cpp b/src/gromacs/nbnxm/pairlist.cpp index ad09daed08..95f8243c88 100644 --- a/src/gromacs/nbnxm/pairlist.cpp +++ b/src/gromacs/nbnxm/pairlist.cpp @@ -249,7 +249,7 @@ static constexpr int sizeNeededForBufferFlags(const int numAtoms) static void resizeAndZeroBufferFlags(std::vector* flags, const int numAtoms) { flags->clear(); - flags->resize(sizeNeededForBufferFlags(numAtoms), 0); + flags->resize(sizeNeededForBufferFlags(numAtoms), gmx_bitmask_t{ 0 }); }