Change Cord iteration spelling under PLATFORM_GOOGLE.
PiperOrigin-RevId: 309329947 Change-Id: Ic2d717cff423a3a35071e86f93d8646bd9b27739
This commit is contained in:
parent
4ec68b65e3
commit
dc71f88f8a
tensorflow/core/lib
@ -265,9 +265,7 @@ uint32 Extend(uint32 crc, const char *buf, size_t size) {
|
||||
|
||||
#if defined(PLATFORM_GOOGLE)
|
||||
uint32 Extend(uint32 crc, const absl::Cord &cord) {
|
||||
absl::CordReader reader(cord);
|
||||
absl::string_view fragment;
|
||||
while (reader.ReadFragment(&fragment)) {
|
||||
for (absl::string_view fragment : cord.Chunks()) {
|
||||
crc = Extend(crc, fragment.data(), fragment.size());
|
||||
}
|
||||
return crc;
|
||||
|
@ -42,9 +42,7 @@ Status SnappyOutputBuffer::Append(StringPiece data) { return Write(data); }
|
||||
|
||||
#if defined(PLATFORM_GOOGLE)
|
||||
Status SnappyOutputBuffer::Append(const absl::Cord& cord) {
|
||||
absl::CordReader reader(cord);
|
||||
absl::string_view fragment;
|
||||
while (reader.ReadFragment(&fragment)) {
|
||||
for (absl::string_view fragment : cord.Chunks()) {
|
||||
TF_RETURN_IF_ERROR(Append(fragment));
|
||||
}
|
||||
return Status::OK();
|
||||
|
@ -192,9 +192,7 @@ Status ZlibOutputBuffer::Append(StringPiece data) {
|
||||
|
||||
#if defined(PLATFORM_GOOGLE)
|
||||
Status ZlibOutputBuffer::Append(const absl::Cord& cord) {
|
||||
absl::CordReader reader(cord);
|
||||
absl::string_view fragment;
|
||||
while (reader.ReadFragment(&fragment)) {
|
||||
for (absl::string_view fragment : cord.Chunks()) {
|
||||
TF_RETURN_IF_ERROR(Append(fragment));
|
||||
}
|
||||
return Status::OK();
|
||||
|
Loading…
Reference in New Issue
Block a user