mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
Simplify
This commit is contained in:
parent
acf381b061
commit
262a3c7ce3
1 changed files with 2 additions and 2 deletions
|
@ -54,12 +54,12 @@ void RefScanSink::operator () (std::string_view data)
|
||||||
fragment, so search in the concatenation of the tail of the
|
fragment, so search in the concatenation of the tail of the
|
||||||
previous fragment and the start of the current fragment. */
|
previous fragment and the start of the current fragment. */
|
||||||
auto s = tail;
|
auto s = tail;
|
||||||
s.append(data.data(), std::min(data.size(), refLength));
|
auto tailLen = std::min(data.size(), refLength);
|
||||||
|
s.append(data.data(), tailLen);
|
||||||
search(s, hashes, seen);
|
search(s, hashes, seen);
|
||||||
|
|
||||||
search(data, hashes, seen);
|
search(data, hashes, seen);
|
||||||
|
|
||||||
auto tailLen = std::min(data.size(), refLength);
|
|
||||||
auto rest = refLength - tailLen;
|
auto rest = refLength - tailLen;
|
||||||
if (rest < tail.size())
|
if (rest < tail.size())
|
||||||
tail = tail.substr(tail.size() - rest);
|
tail = tail.substr(tail.size() - rest);
|
||||||
|
|
Loading…
Reference in a new issue