LSC: Replace cord.ToString() with std::string(cord)
PiperOrigin-RevId: 314966296 Change-Id: Icfadb1d6848c10f5ab5f081f36c496bdc98b0402
This commit is contained in:
parent
a565c473c1
commit
b6b9f0815e
@ -66,7 +66,7 @@ void PopulateTensorFromExtra(const RecvBufRespExtra& extra,
|
|||||||
Tensor* cpu_tensor) {
|
Tensor* cpu_tensor) {
|
||||||
char* head = reinterpret_cast<char*>(DMAHelper::base(cpu_tensor));
|
char* head = reinterpret_cast<char*>(DMAHelper::base(cpu_tensor));
|
||||||
for (const auto& tensor_content_chunk : extra.tensor_content()) {
|
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());
|
tensor_content_chunk.size());
|
||||||
head += tensor_content_chunk.size();
|
head += tensor_content_chunk.size();
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ class StringDest : public WritableFile {
|
|||||||
}
|
}
|
||||||
#if defined(PLATFORM_GOOGLE)
|
#if defined(PLATFORM_GOOGLE)
|
||||||
Status Append(const absl::Cord& data) override {
|
Status Append(const absl::Cord& data) override {
|
||||||
contents_->append(data.ToString());
|
contents_->append(std::string(data));
|
||||||
return Status::OK();
|
return Status::OK();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user