Commit f11ab9eb authored by John Biddiscombe's avatar John Biddiscombe
Browse files

Fix an HDF5 type conversion problem by using a temp var

parent 2862427c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -159,7 +159,8 @@ bool HDF5Reader::execute(const std::string& name, std::vector<std::vector<Scalar
  }

  auto size = readSize(full_name)[0];
  const auto type = H5::VarLenType(HDF5_TYPE<Scalar>::get_PredType());
  auto temp = HDF5_TYPE<Scalar>::get_PredType();
  const auto type = H5::VarLenType(&temp);

  std::vector<hvl_t> data(size);

+2 −1
Original line number Diff line number Diff line
@@ -193,7 +193,8 @@ void HDF5Writer::execute(const std::string& name, const std::vector<std::vector<
    data[i].len = value[i].size();
  }

  const auto type = H5::VarLenType(HDF5_TYPE<Scalar>::get_PredType());
  auto temp = HDF5_TYPE<Scalar>::get_PredType();
  const auto type = H5::VarLenType(&temp);

  write(full_name, std::vector<hsize_t>{data.size()}, type, data.data());
}