mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-07 18:57:19 +02:00
Avoid unnecessary copy of goal log
The data was (accidentally?) copied into a std::string, even though the string is immediately converted into a std::string_view. The code has been changed to construct a std::string_view directly, such that one copy less happens.
This commit is contained in:
parent
cbd5553d57
commit
f61d951909
1 changed files with 1 additions and 1 deletions
|
@ -449,7 +449,7 @@ void Worker::waitForInput()
|
||||||
} else {
|
} else {
|
||||||
printMsg(lvlVomit, "%1%: read %2% bytes",
|
printMsg(lvlVomit, "%1%: read %2% bytes",
|
||||||
goal->getName(), rd);
|
goal->getName(), rd);
|
||||||
std::string data((char *) buffer.data(), rd);
|
std::string_view data((char *) buffer.data(), rd);
|
||||||
j->lastOutput = after;
|
j->lastOutput = after;
|
||||||
goal->handleChildOutput(k, data);
|
goal->handleChildOutput(k, data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue