Fix compilation errors under C++11.

`std::string::data()` is const-only until C++17.

PiperOrigin-RevId: 479708109
This commit is contained in:
Matt Callanan
2022-10-08 03:11:32 +02:00
committed by qrczak
parent d644ca8770
commit 974fcc49e8
3 changed files with 3 additions and 3 deletions

View File

@@ -2041,7 +2041,7 @@ size_t CompressFromIOVec(const struct iovec* iov, size_t iov_cnt,
std::string* compressed) {
// Compute the number of bytes to be compressed.
size_t uncompressed_length = 0;
for (int i = 0; i < iov_cnt; ++i) {
for (size_t i = 0; i < iov_cnt; ++i) {
uncompressed_length += iov[i].iov_len;
}