mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +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
|
@ -66,7 +66,7 @@ public:
|
|||
attrs[size_++] = attr;
|
||||
}
|
||||
|
||||
iterator find(const Symbol & name)
|
||||
iterator find(Symbol name)
|
||||
{
|
||||
Attr key(name, 0);
|
||||
iterator i = std::lower_bound(begin(), end(), key);
|
||||
|
@ -74,7 +74,7 @@ public:
|
|||
return end();
|
||||
}
|
||||
|
||||
Attr * get(const Symbol & name)
|
||||
Attr * get(Symbol name)
|
||||
{
|
||||
Attr key(name, 0);
|
||||
iterator i = std::lower_bound(begin(), end(), key);
|
||||
|
@ -143,7 +143,7 @@ public:
|
|||
bindings->push_back(attr);
|
||||
}
|
||||
|
||||
Value & alloc(const Symbol & name, PosIdx pos = noPos);
|
||||
Value & alloc(Symbol name, PosIdx pos = noPos);
|
||||
|
||||
Value & alloc(std::string_view name, PosIdx pos = noPos);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue