| 492 | //------------------------------------------------------------------------------ |
| 493 | |
| 494 | std::string vtkJSONDataSetWriter::GetUID(vtkDataArray* input, bool& needConversion) |
| 495 | { |
| 496 | auto aosInput = input->ToAOSDataArray(); |
| 497 | // NOLINTNEXTLINE(bugprone-unsafe-functions) |
| 498 | const unsigned char* content = (const unsigned char*)aosInput->GetVoidPointer(0); |
| 499 | int size = input->GetNumberOfValues() * input->GetDataTypeSize(); |
| 500 | std::string hash; |
| 501 | vtkJSONDataSetWriter::ComputeMD5(content, size, hash); |
| 502 | |
| 503 | std::stringstream ss; |
| 504 | ss << vtkJSONDataSetWriter::GetShortType(input, needConversion) << "_" |
| 505 | << input->GetNumberOfValues() << "-" << hash; |
| 506 | |
| 507 | return ss.str(); |
| 508 | } |
| 509 | |
| 510 | //------------------------------------------------------------------------------ |
| 511 |
nothing calls this directly
no test coverage detected