From e1c98a13f5584c430c9d93deea47d84858ca7ee4 Mon Sep 17 00:00:00 2001 From: Alan Gray Date: Tue, 4 Aug 2020 12:30:35 +0000 Subject: [PATCH] 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. --- src/gromacs/nbnxm/pairlist.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }); } -- 2.22.0