Skip to content
Snippets Groups Projects
Commit c715cfde authored by Ben Boeckel's avatar Ben Boeckel
Browse files

vtkMarshalContext: keep a copy of the range

GCC on Linux aarch64 is warning that the temporary doesn't live long
enough. I don't see why it wouldn't though as `.Get()` returns a pointer
which shouldn't need any lifetime extension rule to keep alive.
parent 9d48c7d8
No related branches found
No related tags found
No related merge requests found
......@@ -246,7 +246,7 @@ bool vtkMarshalContext::RegisterBlob(vtkSmartPointer<vtkTypeUInt8Array> blob, st
return false;
}
using namespace nlohmann;
const auto& blobRange = vtk::DataArrayValueRange(blob.Get());
const auto blobRange = vtk::DataArrayValueRange(blob.Get());
auto binaryContainer =
json::binary(std::vector<json::binary_t::value_type>(blobRange.begin(), blobRange.end()));
if (hash.empty())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment