1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-21 09:49:36 +01:00

Fix JSON_IMPL macro to avoid extraneous copies

Should take the thing we're serializing by reference.
This commit is contained in:
John Ericson 2025-09-23 13:05:12 -04:00
parent d9de675357
commit af71a9dbd9
7 changed files with 17 additions and 17 deletions

View file

@ -1494,7 +1494,7 @@ Derivation adl_serializer<Derivation>::from_json(const json & json)
return Derivation::fromJSON(json);
}
void adl_serializer<Derivation>::to_json(json & json, Derivation c)
void adl_serializer<Derivation>::to_json(json & json, const Derivation & c)
{
json = c.toJSON();
}