mirror of
https://github.com/monero-project/monero.git
synced 2025-08-11 15:30:23 -04:00
clang: fix -Wrange-loop-analysis warnings
This commit is contained in:
parent
0a1ddc2eff
commit
451b5a510e
3 changed files with 4 additions and 4 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue