mirror of
https://github.com/NixOS/nix
synced 2025-06-28 01:11:15 +02:00
Don't pass Symbol by reference
Since Symbol is just an integer, passing it by const reference is never advantageous.
This commit is contained in:
parent
29e52194a8
commit
fab731a9d4
4 changed files with 13 additions and 12 deletions
|
@ -26,7 +26,7 @@ Bindings * EvalState::allocBindings(size_t capacity)
|
|||
/* Create a new attribute named 'name' on an existing attribute set stored
|
||||
in 'vAttrs' and return the newly allocated Value which is associated with
|
||||
this attribute. */
|
||||
Value * EvalState::allocAttr(Value & vAttrs, const Symbol & name)
|
||||
Value * EvalState::allocAttr(Value & vAttrs, Symbol name)
|
||||
{
|
||||
Value * v = allocValue();
|
||||
vAttrs.attrs->push_back(Attr(name, v));
|
||||
|
@ -40,7 +40,7 @@ Value * EvalState::allocAttr(Value & vAttrs, std::string_view name)
|
|||
}
|
||||
|
||||
|
||||
Value & BindingsBuilder::alloc(const Symbol & name, PosIdx pos)
|
||||
Value & BindingsBuilder::alloc(Symbol name, PosIdx pos)
|
||||
{
|
||||
auto value = state.allocValue();
|
||||
bindings->push_back(Attr(name, value, pos));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue