mirror of
https://github.com/NixOS/nix
synced 2025-06-25 14:51:16 +02:00
ExprString: Avoid copy of string
This commit is contained in:
parent
3d16f2a281
commit
fa89d317b7
2 changed files with 3 additions and 3 deletions
|
@ -186,7 +186,7 @@ struct ExprString : Expr
|
|||
{
|
||||
std::string s;
|
||||
Value v;
|
||||
ExprString(std::string s) : s(std::move(s)) { v.mkString(this->s.data()); };
|
||||
ExprString(std::string &&s) : s(std::move(s)) { v.mkString(this->s.data()); };
|
||||
Value * maybeThunk(EvalState & state, Env & env) override;
|
||||
COMMON_METHODS
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue