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

PiperOrigin-RevId: 315211101
Change-Id: Ibf47b68e124842247bd743016ad5bb3e2a79c3a9
This commit is contained in:
A. Unique TensorFlower 2020-06-07 21:43:09 -07:00 committed by TensorFlower Gardener
parent d8becf67bb
commit 0078fff2cc

View File

@ -78,7 +78,7 @@ inline void SetProtobufStringSwapAllowed(std::string* src, std::string* dest) {
// in core/platform/protobuf.h, so the generation code doesn't need to determine
// if the type is Cord or string at generation time.
inline std::string ProtobufStringToString(const absl::Cord& s) {
return s.ToString();
return std::string(s);
}
inline void SetProtobufStringSwapAllowed(std::string* src, absl::Cord* dest) {
dest->CopyFrom(*src);