HDF5Restart: avoid unused lambda captures

these are only used with MPI
This commit is contained in:
Arne Morten Kvarving 2023-10-24 14:01:17 +02:00
parent 53fc5be069
commit d1356a07cf

View File

@ -69,8 +69,13 @@ bool HDF5Restart::writeData (const SerializeData& data)
#endif
// Lambda function for writing data to the HDF5 file.
auto&& writeGroup = [this,pid,ptot] (hid_t group, const std::string& name,
int len, const void* data, hid_t type)
#ifdef HAVE_MPI
auto&& writeGroup = [this,pid,ptot]
#else
auto&& writeGroup = []
#endif
(hid_t group, const std::string& name,
int len, const void* data, hid_t type)
{
#ifdef HAVE_MPI
int lens[ptot], lens2[ptot];