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