mirror of
https://github.com/NixOS/nix
synced 2025-06-27 08:31:16 +02:00
Eliminate some large string copying
This commit is contained in:
parent
ce113c32d2
commit
42bc395b63
5 changed files with 25 additions and 23 deletions
|
@ -288,11 +288,11 @@ template PathSet readStrings(Source & source);
|
|||
void StringSink::operator () (const unsigned char * data, size_t len)
|
||||
{
|
||||
static bool warned = false;
|
||||
if (!warned && s.size() > threshold) {
|
||||
if (!warned && s->size() > threshold) {
|
||||
warnLargeDump();
|
||||
warned = true;
|
||||
}
|
||||
s.append((const char *) data, len);
|
||||
s->append((const char *) data, len);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue