diff options
author | selsta <selsta@sent.at> | 2021-04-27 05:21:16 +0200 |
---|---|---|
committer | selsta <selsta@sent.at> | 2021-04-27 05:30:27 +0200 |
commit | 451b5a510e115b450e383007c0d09deccb0d333b (patch) | |
tree | ba230bacc63061c25d7ed9bb34c17fe787c4dcde /contrib/epee | |
parent | Merge pull request #7669 (diff) | |
download | monero-451b5a510e115b450e383007c0d09deccb0d333b.tar.xz |
clang: fix -Wrange-loop-analysis warnings
Diffstat (limited to '')
-rw-r--r-- | contrib/epee/src/byte_slice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/epee/src/byte_slice.cpp b/contrib/epee/src/byte_slice.cpp index 453b63a4c..430853c64 100644 --- a/contrib/epee/src/byte_slice.cpp +++ b/contrib/epee/src/byte_slice.cpp @@ -151,7 +151,7 @@ namespace epee : byte_slice() { std::size_t space_needed = 0; - for (const auto source : sources) + for (const auto& source : sources) space_needed += source.size(); if (space_needed) @@ -160,7 +160,7 @@ namespace epee span<std::uint8_t> out{reinterpret_cast<std::uint8_t*>(storage.get() + 1), space_needed}; portion_ = {out.data(), out.size()}; - for (const auto source : sources) + for (const auto& source : sources) { std::memcpy(out.data(), source.data(), source.size()); if (out.remove_prefix(source.size()) < source.size()) |