diff options
author | Matt Callanan <mpcallanan@google.com> | 2022-10-08 03:11:32 +0200 |
---|---|---|
committer | qrczak <qrczak@google.com> | 2022-10-08 08:41:35 +0200 |
commit | 974fcc49e8b6892ab9c42e2bf69ca1eb61f4e4c7 (patch) | |
tree | 9fe33cd7c2a7f5bc5557a762f0c5bfc099930ffe /snappy.cc | |
parent | d644ca87706548b9a8bf1e13d7669c13c2607b7e (diff) | |
download | snappy-git-974fcc49e8b6892ab9c42e2bf69ca1eb61f4e4c7.tar.gz |
Fix compilation errors under C++11.
`std::string::data()` is const-only until C++17.
PiperOrigin-RevId: 479708109
Diffstat (limited to 'snappy.cc')
-rw-r--r-- | snappy.cc | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; } |