LSC: Replace cord.ToString() with std::string(cord)

PiperOrigin-RevId: 314966296
Change-Id: Icfadb1d6848c10f5ab5f081f36c496bdc98b0402
This commit is contained in:
A. Unique TensorFlower 2020-06-05 11:41:51 -07:00 committed by TensorFlower Gardener
parent a565c473c1
commit b6b9f0815e
2 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ void PopulateTensorFromExtra(const RecvBufRespExtra& extra,
Tensor* cpu_tensor) {
char* head = reinterpret_cast<char*>(DMAHelper::base(cpu_tensor));
for (const auto& tensor_content_chunk : extra.tensor_content()) {
memcpy(head, tensor_content_chunk.data(),
memcpy(head, std::string(tensor_content_chunk).data(),
tensor_content_chunk.size());
head += tensor_content_chunk.size();
}

View File

@ -64,7 +64,7 @@ class StringDest : public WritableFile {
}
#if defined(PLATFORM_GOOGLE)
Status Append(const absl::Cord& data) override {
contents_->append(data.ToString());
contents_->append(std::string(data));
return Status::OK();
}
#endif