diff options
author | luigi1111 <luigi1111w@gmail.com> | 2021-05-12 16:57:32 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2021-05-12 16:57:32 -0500 |
commit | c1a1f2a6ea63b43630d87a095f6984643de41634 (patch) | |
tree | 48fd2dafaebf7a67044d254649d1fb7fd6346d04 /contrib/epee | |
parent | Merge pull request #7686 (diff) | |
parent | clang: fix -Wrange-loop-analysis warnings (diff) | |
download | monero-c1a1f2a6ea63b43630d87a095f6984643de41634.tar.xz |
Merge pull request #7688
451b5a5 clang: fix -Wrange-loop-analysis warnings (selsta)
Diffstat (limited to 'contrib/epee')
-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()) |